Ok, so in my first void, the user inputs 4 numbers via a looping statement. In the next void statement, it is supposed to add these four numbers up and print them on screen. We are currently on structures/classes but I'm not sure how to print the summed up number in another void statement.
As you can see, here is were the user inputs the four numbers. I am not sure if the numbers are added here as well or if they are added in the next void statement.Code:void Salesperson :: getsales () { double revenue; for ( int i = 1; i <= 4; i++ ) { cout << "Enter sales for quarter " << i << ": "; cin >> revenue; setsales( i, revenue); } // end for }



LinkBack URL
About LinkBacks


