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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
float att1,att2,r1,r2,q1,q2,prj,mid;
char choice;
do
{
clrscr();
gotoxy(28,5);
cout<<"PROGRAM#3 (GRADES)";
gotoxy(29,8);
cout<<"Enter attendance";
gotoxy(25,11);
cout<<"Att1 ";
cin>>att1;
gotoxy(25,13);
cout<<"Att2 ";
cin>>att2;
gotoxy(27,16);
cout<<"Enter the recitation";
gotoxy(25,19);
cout<<"R1 ";
cin>>r1;
gotoxy(25,21);
cout<<"R2 ";
cin>>r2;
gotoxy(30,24);
cout<<"Enter Quizzes";
gotoxy(25,27);
cout<<"Q1 ";
cin>>q1;
gotoxy(25,29);
cout<<"Q2 ";
cin>>q2;
gotoxy(31,32);
cout<<"The project";
gotoxy(25,35);
cout<<"Project ";
cin>>prj;
gotoxy(25,39);
cout<<"Midterm exam ";
cin>>mid;
gotoxy(25,42);
float CS=(((att1+att2)/2)*.1)+(((r1+r2)/2)*.3)+(((q1+q2)/2)*.4)+(prj*.2);
cout<<"CLASS STANDING: "<<CS;
gotoxy(25,44);
float PG=((CS*2)+mid)/3;
cout<<"PERIODIC GRADE: "<<PG;
if(PG>=96&&PG<=100)
{gotoxy(25,46);
cout<<"RATING SYSTEM: 1.0";}
else if(PG>=94&&PG<=95)
{gotoxy(25,46);
cout<<"RATING SYSTEM: 1.25";}
else if(PG>=92&&PG<=93)
{gotoxy(25,46);
cout<<"RATING SYSTEM: 1.50";}
else if(PG>=89&&PG<=91)
{gotoxy(25,46);
cout<<"RATING SYSTEM: 1.75";}
else if(PG>=87&&PG<=88)
{gotoxy(25,46);
cout<<"RATING SYSTEM: 2.0";}
else if(PG>=84&&PG<=86)
{gotoxy(25,46);
cout<<"RATING SYSTEM: 2.25";}
else if(PG>=80&&PG<=83)
{gotoxy(25,46);
cout<<"RATING SYSTEM: 2.50";}
else if(PG>=78&&PG<=79)
{gotoxy(25,46);
cout<<"RATING SYSTEM: 2.75";}
else if(PG>=75&&PG<=77)
{gotoxy(25,46);
cout<<"RATING SYSTEM: 3.0";}
else if(PG>=70&&PG<=74)
{gotoxy(25,46);
cout<<"RATING SYSTEM: FAILED";}
else
{gotoxy(25,46);
cout<<"RATING SYSTEM: INPUT ERROR";}
ask:
{
gotoxy(10,49);
cout<<"Do you want to restart? Y/N";
choice=getch();
}
}
while(choice=='y'||choice=='Y');
if(choice=='n'||choice=='N')
return 0;
else
goto ask;
}
|