-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1024.c
More file actions
35 lines (28 loc) · 794 Bytes
/
1024.c
File metadata and controls
35 lines (28 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include<stdio.h>
#include<string.h>
int main(){
int t,i,j;
char str[1001],str1[1000];
scanf("%d",&t);
getchar();
while(t--){
gets(str);
int l=strlen(str);
for(i=0;i<l;i++){
if(str[i]>='a' && str[i]<='z' || str[i]>='A' && str[i]<='Z'){
str[i]+=3;
}
}
int count=0;
for(j=l-1;j>=0;j--){
str1[count]=str[j];
count++;
}
str1[count]='\0';
int temp=l/2;
for(i=temp;i<l;i++){
str1[i]=str1[i]-1;
}
printf("%s\n",str1);
}
}