#include <stdio.h> int main(void) { int c1 = 0, c2 = 0; char ch; while((ch = getchar( )) !=’#’) switch(ch) { case ‘a’: case ‘h’: c1++; default: c2++; } printf(“c1=%d,c2=%d\n”, c1, c2); return 0; }
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题