-
宾丶高
那是你循环的判断条件,你的程序简写如下:cin.get(ch);while(ch != '.'){...cin.get(ch);}所以,每次循环完了都得输入ch来进行下一次循环,当ch = '.'时退出循环。
-
天将明96
cin.get(ch); //这里的cin.get(ch)获得第一个字符
while (ch != '.') { //ch为'.'就退出循环
if (ch == ' ') //ch为空格space就+1
++space;
++total; //每get一个字符,total+1
cin.get(ch); //获取下一个字符
}循环体中的cin.get(ch)是为了逐个获取整句话的每一个字符。如果满足要求,望采纳!<(▰˘◡˘▰)>
-
慕的地8582982
AVDAQTIZZIXRMPSVXSUGIRVRBWZVRTGFHILNDZQFIAYVIEGPKGCRLSOLHEUQLAPPEGGWYOWYBREKGLADTIQLOABRODSVEOEHTLGZIKZCXADIXNOQTPLAKTZBWWSNBSOKZZFOZFYLJXXGEECCJBWZZXJXHDHEDUESVCVAJTGMDWWRHUXKDUDUKVZMSUHOIKYYBIPKOLJUUHQAXWIICWVTQGMZVZEUXNLKEJILFIOCLYBVXAWJHXYJJWZMBRIOEMJLTTSSFGNZNDAWTWGJJEGCFOYBYTXKQZURZCXUEAMDMRHDTXMQTRLUHQFOEPLOBKHHKZVGIXBVJSMVSYSSPDXQKZMBTTDKAAJFLBAVRLRXTNARUFFFCPIPXKLWPTSFCLTMSMLMDXHTKTMPKUCSVLMVWRNKGPZDGWZKNWHYTQZVFOZTVEUDNQMIYFAEOXGQHQGPCFCJFBFCSBEESICZBQMJSIALBXADADGVFYDGCENDAQLCILTODMJZDTVVIXZBFBEHWUSZPDTARNEUWJMPMWEWZVSIUHYCYVLOJFOUOLHRHXBXAJIQGKAITJZBXQAPUQZIFOFVIOSUKUIFVZCVEBQMVMWFPAMIYQMORVYOEKQSWZIFJSILYKTOYUKNDSIODGUKMKNXUXQZIKZJZQGKTMYIQGORHCLIIYGDMNXVEGWWIEIYNRTWSVOLJFBDZKSBRKPFYHXHQAWZZSIHXHDAKMVIQASVYOKBXGNPRKNWTWFISQTWMPLOKHEOASJQMVSCMPFFALVLOYPRBXJWZAXMVLBKHUKNTPLCFVLWIODIYZCYBFCIPEXGPNJGPSFNQPLOYORTWQCEORAQNCLCGOYCRNLUEAYKGWQGBJGXMJJRBLVKOKZPFFZJ