南阳266

 1 #include<stdio.h>
 2 char s[45];
 3 
 4 int lenth(char s[])
 5 {
 6     int i=0;
 7     while(s[i])
 8         ++i;
 9     return i;
10 }
11 int main()
12 {
13     int n;
14     scanf("%d",&n);
15     getchar();
16     while(n--)
17     {
18         gets(s);
19         int len=lenth(s);
20         for(int i=len-1; i>=0; --i)
21             if(s[i]!=' '&&(s[i]<'0'||s[i]>'9'))
22                 printf("%c",s[i]);
23         printf("
");
24     }
25 }
原文地址:https://www.cnblogs.com/qq188380780/p/6240096.html