using namespace std;
Int main ()
{
Int Spaces=0;
Int total=0;
char ch;
Cin. Get (ch);
While (ch! )
='. '{
If (ch=='\ 0')
+ + Spaces;
+ + total;
Cin. Get (ch);
}
Cout & lt;
return 0;
}
After the input string and press enter to exit the DOS window window didn't see the loop is executed and the back of the cout statement
CodePudding user response:
Because your character ch did not assign initial valuesCodePudding user response:
Program runs out naturally out of thereturn 0; Prefix getchar ();