while loop problem

I've been trying to get this while loop to loop and this is what I have so far:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
	cout << "\nEnter the number of tests that have been completed: ";
	cin >> num7;
	
	while (num7 <= 0);
	 	 {
		    cout << endl;
			cout << "Enter the grade for Exam " << num8 << ": ";
			cin >> num9;
			cout << "Enter the maximum possible points for Exam " << num8 << ": ";
			cin >> num10;
			num8 += 1;
			sum3 = sum3 + num9;
			sum4 = sum4 + num10;
		  }


I have it where int num8 = 1; and I wanted it to be where if there were 3 tests, it will do this:
Enter the grade for Exam 1: 87
Enter the maximum possible points for Exam 1: 100

Enter the grade for Exam 2: 84.5
Enter the maximum possible points for Exam 2: 100

Enter the grade for Exam 3: 134
Enter the maximum possible points for Exam 3: 200

And I wanted to have it where when I put in 0 for # of tests taken, it will jump past this loop and go to a text box that will be below it. Any suggestions? Right now it's stuck on test 1 and doesn't work for when I put in 0 for the test number. They didn't say anything about an if loop. Just a while loop.
you need to remove the semicolon on line 4
you need to decrease num7 at some point in the loop or it will continue forever
And you need to change the comparison operator to greater than
Thank you very much Bazzy! Appreciate greatly
Topic archived. No new replies allowed.