hello guys
i made this code for the universty assignment i get 1.2 total gpa but when i did on hard copy i get 1.4 why values are
20,40,50,
code
#include<stdlib.h>
#include<iostream>
using namespace std;
int main()
{
// varibales Declaration!
int English_subject, Computer_subject, Calculas_subject;
float english_GPA, computer_GPA, calculas_GPA, total_CGPA;
char grades,Function_return_to_start;
do {
//This command is used for Clear Screen
system("cls");
cout<<"******************************Assesment system*********************************\n\n";
// Marks of English which we enter when program is Run!
cout<<"\t\t###***** Welcome To BSCS 2nd Semester Group *****###! \n\n\t\t\tCS201 Fist Assignment compelete Solution\n";
cout << "\n\nPlease Enter Marks of Englsih:\t";
cin >> English_subject;
// Warning messages for Zero CGP.
if (english_GPA == 0.00)
{
cout << "\n\n!You have to repeat English subject";
}
if (computer_GPA == 0.00)
{
cout << "\n\n!You have to repeat Computer subject";
}
if (calculas_GPA == 0.00)
{
cout << "\n\n!You have to repeat Calculus subject";
}
cout << "\n\n Do you want to repeat (Y/N)? \t";
cin >> Function_return_to_start;
}
while (Function_return_to_start== 'Y' or Function_return_to_start== 'y');