0
Why getting the error
#include <stdio.h> #include<string.h> int main() { int key, i; char data[30]; printf("ENTER THE PLAIN TEXT : "); //scanf("%c",&data); gets(data); printf("ENTER THE KEY VALUE : "); scanf ("%d",&key); for(i=0;i<strlen(data);i++) { if (data[i]==' ') { } else { if(data[i]>='x') { data[i]=data[i]-26; } data[i]=data[i]+key; }} printf("YOUR CEASER CIPHER TEXT IS ", data); return 0; }
2 Respostas
0
All you have warnings...
Instead of gets() use fgets() function.
gets() is deprecated one..
And you are not printing result..
Use
printf("YOUR CEASER CIPHER TEXT IS %s", data);
0
Ok