标签:return etc span putchar break class cas logs color
1 #include<stdio.h> 2 char s[10]; 3 int lenth(char s[]) 4 { 5 int i=0; 6 while(s[i]) 7 ++i; 8 return i; 9 } 10 int main() 11 { 12 int n; 13 scanf("%d",&n); 14 getchar(); 15 while(n--) 16 { 17 gets(s); 18 int len=lenth(s); 19 for(int i=len-1; i>=0; --i) 20 switch(s[i]-‘0‘) 21 { 22 case 0:putchar(‘O‘);break; 23 case 1:putchar(‘O‘);break; 24 case 2:putchar(‘T‘);break; 25 case 3:putchar(‘T‘);break; 26 case 4:putchar(‘F‘);break; 27 case 5:putchar(‘F‘);break; 28 case 6:putchar(‘S‘);break; 29 case 7:putchar(‘S‘);break; 30 case 8:putchar(‘E‘);break; 31 case 9:putchar(‘N‘);break; 32 } 33 puts(""); 34 } 35 }
标签:return etc span putchar break class cas logs color
原文地址:http://www.cnblogs.com/qq188380780/p/6344856.html