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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
#include<iostream.h>
#include<conio.h>
void main()
{
double arr[10] = {0.00,1.00,1.67,2.00,2.33,2.67,3.00,3.33,3.67,4.00};
int totalsub,cdt=0,cdt1=0,cdt2=0,cdt3=0,cdt4=0,cdt5=0,cdt6=0,cdt7=0,cdt8=0,cdt9=0,cdt0=0,full=0;
int obtmarks =0,sum=0;
int obt1_marks =0;
double gpa0=0,gpa1=0,gpa2=0,gpa3=0,gpa4=0,gpa5=0,gpa6=0,gpa7=0,gpa8=0,gpa9=0,gpa=0;
cout<<" welcome to GAP a calculator from >1 subjucts: \n";
cout<<" __________________________________________________\n\n\n";
cout<<"How Much total subjuct You Have Studied In Current Semester:";
cin>>totalsub;
for(int i=1;i<=totalsub;i++)
{
cout<<"Please Enter Your total subjuct "<<i<<" Marks";
cin>> obtmarks;
cout<<"\nPlease Enter The Credit Hours Of "<<i<<" Subject:";
cin>>cdt;
if((obtmarks >= 0) && (obtmarks <= 39))
{ cout<< "The individual GPA For This Course is: "<< arr[0]<<endl;
cout<<"The Grade Of This subjuct is 'F':\n";
gpa0 = cdt*arr[0];
cdt1 = cdt;
}
if((obtmarks >= 40) && (obtmarks <= 44))
{
cout<<"The Individual GPA For This Course is: "<<arr[1]<<endl;
cout<<"The Grade Of This subjuct is 'D':\n";
gpa1 = cdt*arr[1];
cdt2 = cdt;
}
if((obtmarks >= 45) && (obtmarks <= 49))
{
cout<<"The Individual GPA For This Course is: "<<arr[2]<<endl;
cout<<"The Grade Of This subjuct is 'C-':\n";
gpa2 = cdt*arr[2];
cdt3 = cdt;
}
if((obtmarks >= 50) && (obtmarks <= 54))
{
cout<<"The Individual GPA For This Course is: "<<arr[3]<<endl;
cout<<"The Grade Of This subjuct is 'C':\n";
gpa3 = cdt*arr[3];
cdt4 = cdt;
}
if((obtmarks >= 55) && (obtmarks <= 59))
{
cout<<"The Individual GPA For This Course is: "<<arr[4]<<endl;
cout<<"The Grade Of This subjuct is 'C+':\n";
gpa4 = cdt*arr[4];
cdt5 = cdt;
}
if((obtmarks >= 60) && (obtmarks <= 64))
{
cout<<"The Individual GPA For This Course is: "<<arr[5]<<endl;
cout<<"The Grade Of This subjuct is 'B-':\n";
gpa = cdt*arr[5];
cdt6 = cdt;
}
if((obtmarks >= 65) && (obtmarks <= 69))
{
cout<<"The Individual GPA For This Course is: "<<arr[6]<<endl;
cout<<"The Grade Of This subjuct is 'B':\n";
gpa6 = cdt*arr[6];
cdt7 = cdt;
}
if((obtmarks >= 70) && (obtmarks <= 74))
{
cout<<"The Individual GPA For This Course is: "<<arr[7]<<endl;
cout<<"The Grade Of This subjuct is 'B+':\n";
gpa7 = cdt*arr[7];
cdt8 = cdt;
}
if((obtmarks >= 75) && (obtmarks <= 79))
{
cout<<"The Individual GPA For This Course is: "<<arr[8]<<endl;
cout<<"The Grade Of This subjuct is 'A-':\n";
gpa8 = cdt*arr[8];
cdt9 = cdt;
}
if((obtmarks >= 80) && (obtmarks <= 100))
{
cout<<"The Individual GPA For This subjuct is: "<<arr[9]<<endl;
cout<<"The Grade Of This Course is 'A':";
cout<<"\n\n";
gpa9 = cdt*arr[9];
cdt0 = cdt;
}
sum= gpa0 + gpa1 + gpa2 + gpa3 + gpa4 + gpa5 + gpa6 + gpa7 + gpa8 + gpa9;
full =cdt1 + cdt2 + cdt3 + cdt4 + cdt5 + cdt6 + cdt7+ cdt8 + cdt9 + cdt0;
gpa = sum/full;
cout<<"The Grand GPA Of All Subjects Are: "<<gpa<<endl;
}
}
|