You are viewing a single comment's thread. Return to all comments →
the code i wrote is :-
int main(){ int n; scanf("%d",&n); char s[100]; int a[100]; int i; for(i=0;i=65)&&(a[i]<=90)) {s[i]=((s[i]-64+k)%26)+64; printf("%c",s[i]); } else if((a[i]>=97)&&(a[i]<=122)) { s[i]=((s[i]-97+k)%26)+97; printf("%c",s[i]); } else printf("%c",s[i]);
} return 0;
}
{BUT WHY IS THIS CODE NOT WORKING IF I ENTER A SPECIAL CHARACTER IN BETWEEN?}
Seems like cookies are disabled on this browser, please enable them to open this website
Caesar Cipher: Encryption
You are viewing a single comment's thread. Return to all comments →
the code i wrote is :-
include
include
include
include
include
include
include
int main(){ int n; scanf("%d",&n); char s[100]; int a[100]; int i; for(i=0;i=65)&&(a[i]<=90)) {s[i]=((s[i]-64+k)%26)+64; printf("%c",s[i]); } else if((a[i]>=97)&&(a[i]<=122)) { s[i]=((s[i]-97+k)%26)+97; printf("%c",s[i]); } else printf("%c",s[i]);
}
{BUT WHY IS THIS CODE NOT WORKING IF I ENTER A SPECIAL CHARACTER IN BETWEEN?}