Close Back

Encrypt.c
Decrypt.c


Encrypt.c

#include <stdio.h>
#include <conio.h>

main()
{
 char input,answer;
 clrscr();
 do
  {
   printf("\nPlease enter a sentence to be encrypted:\n");
   printf("{enter 0 at the end}\n");
   scanf("%c",&input);

   do
    {
     printf("%c",input + 1);
     scanf("%c",&input);
    }
   while(input != '0');

   printf("\n\nencrypt another(y/n)");
   scanf("%*c%c",&answer);
  }
 while(answer == 'y' || answer == 'Y');

 printf("\n\nThanx for using this program\n                 -Rajesh");
 getch();
}


Decrypt.c


#include <stdio.h>
#include <conio.h>

main()
{
 char input,answer;
 clrscr();
 do
  {
   printf("\nPlease enter a sentence to be decrypted:\n");
   printf("{enter 0 at the end}\n");
   scanf("%c",&input);

   do
    {
     printf("%c",input - 1);
     scanf("%c",&input);
    }
   while(input != '0');

   printf("\n\ndecrypt another(y/n)");
   scanf("%*c%c",&answer);
  }
 while(answer == 'y' || answer == 'Y');

 printf("\n\nThanx for using this program\n                 -Rajesh");
 getch();
}