在线等.为什么没输出结果??
#include<iostream>using namespace std;int main(){ char cval; int aCnt=0,eCnt=0,iCnt=0,oCnt=0,uCnt=0,otherCnt=0; while(cin>>cval) switch(cval) { case 'a': case 'A': ++aCnt; break; case 'e': case 'E': ++eCnt; break; case 'i': case 'I': ++iCnt; break; case 'o': case 'O': ++oCnt; break; case 'u': case 'U': ++uCnt; break; default : ++otherCnt;; break; } cout<<"aA:"<<aCnt<<" " <<"eE:"<<eCnt<<" " <<"iI:"<<iCnt<<" " <<"oO:"<<oCnt<<" " <<"uU:"<<uCnt<<" " <<endl;} #include<iostream>using namespace std;int main(){ char cval; int aCnt=0,eCnt=0,iCnt=0,oCnt=0,uCnt=0,otherCnt=0; while(cin>>cval,cval!='0') switch(cval) { case 'a': case 'A': ++aCnt; break; case 'e': case 'E': ++eCnt; break; case 'i': case 'I': ++iCnt; break; case 'o': case 'O': ++oCnt; break; case 'u': case 'U': ++uCnt; break; default : ++otherCnt;; break; } cout<<"aA:"<<aCnt<<" " <<"eE:"<<eCnt<<" " <<"iI:"<<iCnt<<" " <<"oO:"<<oCnt<<" " <<"uU:"<<uCnt<<" " <<endl;}