mark sheet

Mark Sheet Program




If    per<60 and="" per="">=50 then Grade is “C”
If    per<75 and="" per="">=60 then Grade is “B”
If    per<80 and="" per="">=75 then Grade is “A”
If    per >80 then Grade is “A-1”
If    per<50 b="" fail.="" prints="" then="">


#include <iostream.h>

#include <conio.h>

int main()

{

float a,b,c,d,e,f,g,h;

cout<<"English: ";

cin>>a;

cout<<"Applied Physics: ";

cin>>b;

cout<<"ITC: ";

cin>>c;

cout<<"Applied Calculus: ";

cin>>d;

e=a+b+c+d,g=400, f=e*100/g;

cout<<"Obtained Marks= "<<e<<endl<<"Max:Marks= "<<g<<endl<<"Percentage="<<f<<"%"<<endl;

if (f>=80)

cout<<"Grade= A-1";

else if (f<80 && f>=75)

cout<<"Grade= A";

else if (f<75 && f>=60)

cout<<"Grade= B";

else if (f<60 && f>=50)

cout<<"Grade= C";

else if (f<50)

cout<<endl " FAIL";

getch();

return 0;

}

No comments :

Post a Comment