0
Need help. Not sure how to fix code.
My cODE IS OUTPUTTING ALOT OF THE COUT STATEMENT AND DONT KNOW HOW TO FIX . NeED SOME HELP. Thanks https://code.sololearn.com/c961lGYP332t/?ref=app HERE IS MY CODE
9 odpowiedzi
0
hi Carlye
that is because that code is in the while loop so will be printed every time the loop iterates
0
how do i get to leave the loop once its done?
0
i also need it to be a do while loop. would that help the problem with the loop?
0
so what you need to do is...
move this code so that it is outside and above the loop...
cout<<"Enter 100 Grades separated by a single space, then press <Enter>: ";
cin>>x;
secondly you need to split the string before the while loop.
thirdly the code will end automaticly at return 0;
0
which part of the string?
0
sorry not sure what you mean
0
by split the string i mean take the variable x and split it into the hundred grades
0
can i see an example. i dont think ive done what youare explaining