问题描述:
28.运行以下程序后,如从键盘上输入china#,则输出为().
#include ”stdio.h”
main()
{
int v1=0,v2=0;
char ch;
while ( (ch=getchar()) = ’# ’)
switch (ch)
{ case ’a’:
case ’h’:
default:v1++;
case ’o’:v2++;
}
printf(”%d,%d\n”,v1,v2);
}
#include ”stdio.h”
main()
{
int v1=0,v2=0;
char ch;
while ( (ch=getchar()) = ’# ’)
switch (ch)
{ case ’a’:
case ’h’:
default:v1++;
case ’o’:v2++;
}
printf(”%d,%d\n”,v1,v2);
}
问题解答:
我来补答展开全文阅读