急急急 C语言题目求解答
#include<stdio.h>main(){intk;charch,a[10],*s[10]={"one","two","three","four"};k=0;whi...
#include <stdio.h>
main()
{ int k;
char ch,a[10],*s[10]={"one","two","three","four"};
k=0;
while((ch=getchar())!='\n'&&k<9)
if(ch>'5'&&ch<'8')a[k++]=ch;
a[k]='\0';
for(k=0;a[k]!='\0';k++)
printf("%s ",s['9'-a[k]-1]);
}
(22)程序运行时,输入5678,输出 (22) A、two three B、two
C、one four three D、four three two one
( 展开
main()
{ int k;
char ch,a[10],*s[10]={"one","two","three","four"};
k=0;
while((ch=getchar())!='\n'&&k<9)
if(ch>'5'&&ch<'8')a[k++]=ch;
a[k]='\0';
for(k=0;a[k]!='\0';k++)
printf("%s ",s['9'-a[k]-1]);
}
(22)程序运行时,输入5678,输出 (22) A、two three B、two
C、one four three D、four three two one
( 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询