I'm trying to write a C++ program that will allow a user to input a number from the keyboard. Then using a loop, that will perform 10 times, multiply the entered number by the loop counter. Print out the loop counter, the entered number and the product of the loop counter and the entered number. A one-time heading should be displayed before information is printed.
This kinda of what I have so far:
#include <iosteam>
using namespace std;
int main ()
{
Start
Declare: numScores, sum, score, avg, SENTINEL = 200
numScores = 0
Do
Write "Enter your score, or 200 to quit: "
Read score
While score < 0
Write "There are no negative scores!"
Write "Enter another: "
Read score
End While
If score != SENTINEL Then
numScores = numScores + 1
sum = sum + score
End If
While score != SENTINEL
If numScores != 0 Then
avg = sum/numScores
Write "Average = ",avg
Else
Write "No valid scores were input."
End If
Stop
}
All the programs I have tried to make are not working any suggestions?
Is this pseudocode of the steps you want to do? Just wondering because the heading is C++ but the rest of it isn't. (small typo at top <iostream> not <iosteam>)
Are you confusing C++ with Visual Basic or something?
I would go back through the tutorial and read starting from the beginning: http://www.cplusplus.com/doc/tutorial/
No it's a C++ program that I'm trying to create, I realize that I kind of wrote this in the wrong section. I'm a beginner... I was just trying to find the different programs to help me with this one, and yes that is pseudocode...