Im new to c++. Just trying to make a program where you can rate something out of ten and the total adds until the loop ends.
I was just wondering how to output the overall total of the rating added to the score in one place(so it changes in one place). eg top right hand of screen.
sorry if i sound like a mugchesse.
here is my code:
[b]#include <iostream>
#include <cstdlib>
using namespace std;
int scoreadd(int total, int rate) {
do {
cout << "rate person between 1 and 10" << "\n";
cin >> rate;
if(rate > 10)
cout << "You must rate between 1 and 10" << "\n";
else
total = rate + total;
}
while
(total < 100);
cout << "Score limit reached";
return(total);
}
int main() {
int student;
student = scoreadd(0,0);
cin >> student;
system("PAUSE");
return(0);
}[/b]