写出下列程序的输出结果。#include<stdio.h>voidmain(){charx;intn=0,k=0;while((x=getchar())!=’#’){//运行时输入:athefthethethere#switch(x){case’t’:k++;break;case’h’:if(k==1)k++;break;case’e’:if(k==2)k++;break;default:k=0;}if(k==3)n++;}printf("%d\n",n);}
A.8次 B.10次 C.2次 D.无数次