hello guys...
can you help me to find coding for grading system for my new assingment...( grade n grade point)
grade A= 4.00
A- = 3.70
B+ = 3.50
B = 3.00
B- = 2.67
C+ =2.50
C = 2.00
C- = 1.67
D+ = 1.33
D = 1.00
E = 0.00
its must cout for the grade point..when the user/students enter the grade,the cout must be the grade point??did you get my question...I'm a malay student so my english is not very well...

this what I've done so far but it doesnt work..

/* Program to find out students grade pointer*/
#include<iostream.h>
void main()
{
char grade[2];
//grade  = 0;
cout<< " please enter your grade : ";
{
if (grade =="A")
cout<< grade;//4.00";
else if (grade =="A-")
cout<< "3.70";
else if (grade == "B+")
cout<< "3.50";
else if (grade == "B")
cout<< "3.00";
else if (grade == "B-")
cout<< "2.67";
else if (grade == "C+")
cout<< "2.50";
else if (grade == "C")
cout<< "2.00";
else if (grade == "C-")
cout<< "1.67";
else if (grade == "D+")
cout<< "1.33";
else if (grade == "D")
cout<< "1.00";
else if (grade == "E")
cout<< "0.00";
}
//return 0;
}

Edited 6 Years Ago by WaltP: Added CODE Tags

This should work . But if you enter the word "Alfa" it says that your grade is "4.00" . Good Luck Debugging it , i ain't doing your whole homework

#include <iostream.h>

char grade;
int i=1;

int main(){
 do{
 cout<< "Enter Grade : ";cin>>grade;
 if (grade == 'A'){cout<< "4.00";i=0;}
 if (grade == 'A-'){cout<< "3.70";i=0;}
 if (grade == 'B+'){cout<< "3.50";i=0;}
 if (grade == 'B'){cout<< "3.00";i=0;}
 if (grade == 'B-'){cout<< "2.67";i=0;}
 if (grade == 'C+'){cout<< "2.50";i=0;}
 if (grade == 'C'){cout<< "2.00";i=0;}
 if (grade == 'C-'){cout<< "1.67";i=0;}
 if (grade == 'D+'){cout<< "1.33";i=0;}
 if (grade == 'D'){cout<< "1.00";i=0;}
 if (grade == 'E'){cout<< "0.00";i=0;}
 if(i==1)cout<<"Wrong Grade"<<endl;
 }while(i==1);
}
Comments
We do NOT give working answers on this forum. Whe HELP them find their own answers.

I would use string grade; instead of char grade; , so that you can have the - or + with it. A char represents one character.

Also, why don't you use int main() instead of void main() ? And you probably want #include<iostream> instead of #include<iostream.h> .

Edited 6 Years Ago by MyrtleTurtle: punctuation

This article has been dead for over six months. Start a new discussion instead.