0

Writing a program to calculate the grade score of a student

I need help

24th Apr 2018, 8:49 PM
Ubi Emmanuel
Ubi Emmanuel - avatar
5 odpowiedzi
+ 1
You'd need to give more information.
24th Apr 2018, 10:39 PM
Emma
+ 1
I didn't know exactly what you were trying to achieve, but I've fixed all bugs, and made some guesses: https://code.sololearn.com/cu4YLJze6TWp/#cpp You will have to let me know if that is correct. Any questions, feel free to ask.
24th Apr 2018, 11:03 PM
Emma
0
#include <iostream> using namespace std; char Subject[100]; double Result; char unicalResult(double CA, double ExamScore ); int main(); { int marks; double CA=0.0; double ExamScore=0.0; cout<<"Computer Science continous assessment: "<<end1; cin>>CA; cout<<"____________________"; cout<<"Enter subject "<<end1; cin>>CSC181; cout<<"Enter Exam Score: "<<end1; cin>>40; cout<<"Subject: "<<subject<<end1; cout<<"Continous assessment: "<<CA<<end1; cout<<"Your Unical Result is: "<<unicalResult(CA, ExamScore)<<end1; } char unicalResult(double CA, double ExamScore) { Result=CA+ExamScore; char Grade; if(Result<=39.9) { Grade="F"; } else(Result<=44.9) { Grade="E"; } else(Result<=49.9) { Grade="D"; } else(Result<=59.9) { Grade="C"; } else(Result<=69.9) { Grade="B"; } else(CA>=70.0) { Grade="A"; } return result; }
24th Apr 2018, 10:46 PM
Ubi Emmanuel
Ubi Emmanuel - avatar
0
help me debug
24th Apr 2018, 10:46 PM
Ubi Emmanuel
Ubi Emmanuel - avatar
0
When you write cin >> CSC181 and cin>>40..."40" and "csc" are undeclared variables. That is to say that 40 is the name of your variable and not the value of it
24th Apr 2018, 11:00 PM
Luciano Ariel Caputi
Luciano Ariel Caputi - avatar