fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4. int main()
  5. {
  6. long long int t,l,r;
  7. scanf("%lld", &t);
  8. while(t--){
  9. char te[10000], c[10000];
  10.  
  11. fgets(te, sizeof(te), stdin);
  12. for(long int i=0; i<strlen(te); i++)if(te[i] != '\n')c[i]=te[i];else c[i]='\0';
  13. for(int i=0; c[i] !='\0';i++ )
  14. if(c[i] >='A' && c[i]<='Z' || c[i]>= 'a' && c[i]<='z')c[i]+=3;
  15.  
  16.  
  17. l = 0;
  18. r = strlen(c)-1;
  19.  
  20. while(l<r){
  21. char temp = c[l];
  22. c[l]=c[r];
  23. c[r]=temp;
  24. l++;r--;
  25.  
  26. }
  27.  
  28. for(int i= strlen(c)/2; c[i] !='\0';i++ )
  29. c[i]-=1;
  30.  
  31. printf("%s\n", c);
  32.  
  33.  
  34. }
  35.  
  36.  
  37.  
  38.  
  39. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
Standard output is empty