Advertisement
Nayeemzaman

Untitled

Oct 11th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5. int n,i,j,l;
  6. char ch[1002];
  7.  
  8. scanf("%d",&n);
  9. getchar();
  10. for(i=0;i<n;i++)
  11. {
  12. gets(ch);
  13. strrev(ch);
  14. l = strlen(ch);
  15. for(j=0;j<l;j++)
  16. {
  17. if(ch[j]>='a'&&ch[j]<='z' || ch[j]>='A'&&ch[j]<='Z')
  18. ch[j] += 3;
  19. }
  20. ch[j]='\0';
  21. for(j=l/2;j<l;j++)
  22. {
  23. ch[j] -= 1;
  24. }
  25. printf("%s\n",ch);
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement