开放大学在线学习搜题
当前位置:首页 > 学习题库 > C程序设计语言

问题

当运行以下程序,用户输入China# 程序的运行结果是 。 #include "stdio.h" main()

发布时间:2025-10-03   作者:国家开放大学   浏览:0

当运行以下程序,用户输入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);}