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; }

25th Aug 2022, 1:01 PM
Mr. A
Mr. A - avatar
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);
25th Aug 2022, 1:11 PM
Jayakrishna 🇮🇳
0
Ok
25th Aug 2022, 1:12 PM
Mr. A
Mr. A - avatar