问题描述:
运行以下程序后,如果从键盘上输入china#,则输出结果为 :A、2,0 B、5,0 C、5,5 D、2,5
#include
main( )
{ int v1=0,v2=0;
char ch ;
while ((ch=getchar())!='#')
switch (ch )
{ case 'a':
case 'h':
default:v1++;
case '0':v2++;
}
printf(""%d,%d\n"",v1,v2);" 具体求解思路
#include
main( )
{ int v1=0,v2=0;
char ch ;
while ((ch=getchar())!='#')
switch (ch )
{ case 'a':
case 'h':
default:v1++;
case '0':v2++;
}
printf(""%d,%d\n"",v1,v2);" 具体求解思路
问题解答:
我来补答展开全文阅读