Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- int n,i,j,l;
- char ch[1002];
- scanf("%d",&n);
- getchar();
- for(i=0;i<n;i++)
- {
- gets(ch);
- strrev(ch);
- l = strlen(ch);
- for(j=0;j<l;j++)
- {
- if(ch[j]>='a'&&ch[j]<='z' || ch[j]>='A'&&ch[j]<='Z')
- ch[j] += 3;
- }
- ch[j]='\0';
- for(j=l/2;j<l;j++)
- {
- ch[j] -= 1;
- }
- printf("%s\n",ch);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement