关于C语言
#include<stdio. h>
main ( )
{
int v1=0, v2=0;
char ch;
char ch;
while {(ch=getchar ())! =‘#‘}
switch (ch)
{
case‘a‘;
case‘h‘;
dafault: v1++ ;
case ‘0‘:v2++ ;
}
printf ("%d, %d\n", v1, v2);
}
如里从键盘输入china# (回车),则输出结果是_________.
参考答案:5,5
#include<stdio. h>
main ( )
{
int v1=0, v2=0;
char ch;
char ch;
while {(ch=getchar ())! =‘#‘}
switch (ch)
{
case‘a‘;
case‘h‘;
dafault: v1++ ;
case ‘0‘:v2++ ;
}
printf ("%d, %d\n", v1, v2);
}
如里从键盘输入china# (回车),则输出结果是_________.
参考答案:5,5