标签:字符 turn har getc printf 逆序输出 while strlen stdio.h
#include <stdio.h>
#include <string.h>
int main()
{
int n, i, j, len;
char a[40];
scanf("%d", &n);
getchar();
while (n--)
{
gets(a);
len = strlen(a);
for (i = len - 1; i >= 0; i--)
{
if (a[i]>‘9‘&&a[i] != ‘ ‘)
printf("%c", a[i]);
}
printf("\n");
}
return 0;
}
标签:字符 turn har getc printf 逆序输出 while strlen stdio.h
原文地址:https://www.cnblogs.com/minTTremor/p/9093872.html