Skip to content
This repository has been archived by the owner on Oct 23, 2018. It is now read-only.

Commit

Permalink
Merge pull request #4702 from misrarahul11007/patch-1
Browse files Browse the repository at this point in the history
Merged by aniket965
  • Loading branch information
Aniket965 committed Oct 18, 2018
2 parents 50155c0 + 4c5c05e commit 4212887
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions C Language/c program to implement ceaser cipher algorithm.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <stdio.h>

int main()
{
char array[100], cipher[100];
int c=0, x=0, y=0;
int z;
printf("This Program will encrypt according to your needs\n");
printf("Enter the cipher key\n");
scanf("%d",&z);
printf("Enter the sentence");
while((c=getchar()) != '\n')
{
array[x++]=(char)c;
cipher[y++]=(char)(c+z);
}

array[x]=0;
cipher[y]=0;

printf("%s\n",cipher);

return 0;
}

0 comments on commit 4212887

Please sign in to comment.