Hello everyone, I've been browsing this forum for small while and have gotten some great information out of it through searching so I thank you very much for that.
Currently though I have a C++ program I have to write for class that inputs the full name of the student, then it asks for their lab point, their homework points and their test points.
I'm going to make it out of a hundred, so I'll have the lab worth 35 points, hw worth 15 points, and test worth 50 points.
Then it has to take the total value and give it a letter grade based on these requirements:
100-80 A
79 - 50 B
49 - 45 C
44 and below F
Here is what I have so far, I've got the total grade in and the name input(except the last name doesn't show for some reason) so now I just have to get the program to spit out a letter grade using if else statements. Need help ASAP!!!! this is due in an hour :(
#include <iostream>
float lab, homework, test, total;
char line[75];
main()
{
cout<< "Enter Students' lab points from 0-35 "<< "\n";
cin>> lab;
cout<< "Enter Students' homework points from 0-15 "<< "\n";
cin>> homework;
cout<< "Enter Students' test points from 0-50 "<< "\n";
cin>> test;
total = lab + homework + test;
cout<< "Enter students' full name: "<< "\n";
cin>> line;
cout<< "Students' name is "<< line << "\n";
cout<< "Final grade is "<< total << "\n";
return(0);
}