encrypt message in c
// Encryption : A is replaced by B, B is replaced by C and Z is replaced by A
#include <stdio.h>
#include <string.h>
void main()
{
char arr[100];
int i;
printf("Enter the array: ");
gets(arr);
for(i=0; i<strlen(arr); i++)
{
if (arr[i]>=65 && arr[i]<90)
arr[i] = arr[i] + 1;
else if (arr[i]>=97 && arr[i]<122)
arr[i] = arr[i] + 1;
else if (arr[i] == 90)
arr[i] ='A';
else if (arr[i] == 122)
arr[i] ='a';
else
printf("enter characters");
}
printf("\nEncrypted message is: \n\n");
puts(arr);
}