Program still does not work with my changes!

This program still does not work with my current changes.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  // The program will read ten names form the user's input and compute  //
// the grade for each name and prints the grade and tell whether the //
// grade is excellent, well done, good, or needs improvement. //

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()

{
	str studentname;
	int score;
	int totalpoints;
	int percentage;
	int count;
	float finalscore;
	count = 1
		while (count<= 10)
	{
		cout << "Please enter the student's name" << endl;
		cin >> studentname;
		cout << "Please enter the student's score" << endl;
		cin >> studentscore;
		cout << "Please enter the total points" << endl;
		cin >> totalpoints;
		count = count++
		ceil (finalscore) = score / totalpoints;
		percentage = finalscore * 100;
		if (percentage >= '90')
			cout << studentname << percentage << "%" << finalscore << "Excellent" << endl;
		if (percentage >= '80' && percentage < '90')
			cout << studentname << percentage << "%" << finalscore << "Well Done" << endl;
		if (percentage >= '70' && percentage < '80')
			cout << studentname << percentage << "%" << finalscore << "Good" << endl;
		if (percentage >= '60' && percentage < '70')
			cout << studentname << percentage << "%" << finalscore << "Needs Improvement" << endl;
		if (percentage < '50' && percentage < '60')
			cout << studentname << percentage << "%" << finalscore << "Failed" << endl;
	}
			return 0;
		
}
str should be string.
I changed that, thanks. Still does not work correctly.
The program ask "Please enter the student's name" and I enter a name. Then the program keeps on printing "Please enter student's score" continuously.
Looks like it's an issue w/ entering a first name and a last time... It (mostly) works when you enter in a single word for the name. You can ask for last name and first name separately as a solution.
WOW! I can not get it to work with just a first name with me.
Well, I had to make a few changes.

1) You are missing a semi-colon on line 18.
2) I got rid of all the apostrophes around the numbers. They are not necessary.
3) I got rid of ceil (not familiar with the function, but it was causing errors).
4) Changed line 27 to count = count + 1; (maybe not necessary).
5) Declared studentscore, since you hadn't done that yet.

Does your compiler give you errors? A lot of the mistakes I corrected above should be very obvious to fix after looking at compiler errors.
thank you, hyperfine. done. How can I make the program accepts just the student's last name only?
Topic archived. No new replies allowed.