Untitled
unknown
plain_text
5 months ago
881 B
1
Indexable
#include<stdio.h> int main(void){ int x,y; x='a'-'A'; char a[6]; char b[6]; char c[6]; scanf("%s",a); scanf("%s",b); scanf("%s",c); int i; i=0; while(i<5){ if(a[i]>'Z'){ a[i]=a[i]-x; } else{ b[i]=b[i]-x; } y=b[i]-a[i]; if(c[i]>'Z'){ c[i]=c[i]-x+y; if(c[i]>'Z'){ c[i]=c[i]-('Z'-'A')-1; } if(c[i]<'A'){ c[i]=c[i]+('Z'-'A')+1; } } else{ c[i]=c[i]+x+y; if(c[i]>'z'){ c[i]=c[i]-('Z'-'A')-1; } if(c[i]<'a'){ c[i]=c[i]+('Z'-'A')+1; } } printf("%c",c[i]); i++; } printf("\n"); return 0; }
Editor is loading...
Leave a Comment