Wednesday, 10 September 2014

Calculating CGPA in C++

18:35

#include <iostream>
#include <conio.h>
using namespace std;
int main()
{float x,y,z;
float cal,ap,wp,lca,isl,cf,bme,edc,ems,la,ode,cad;
cout<<"Enter the grade in Calculus ";
cin>>cal;
cout<<"Enter the grade in Applied Physics ";
cin>>ap;
cout<<"Enter the grade in Workshop ";
cin>>wp;
cout<<"Enter the grade in LCA ";
cin>>lca;
cout<<"Enter the grade in Islamiat ";
cin>>isl;
cout<<"Enter the grade in Computer Fundamentals ";
cin>>cf;
cout<<"Enter the grade in BME ";
cin>>bme;
cout<<"Enter the grade in EDC ";
cin>>edc;
cout<<"Enter the grade in EMS ";
cin>>ems;
cout<<"Enter the grade in LA ";
cin>>la;
cout<<"Enter the grade in ODE ";
cin>>ode;
cout<<"Enter the grade in CAD ";
cin>>cad;
y=(cf*3+isl*2+wp*2+ap*4+cal*3+lca*4)/18;
cout<<"The Spga in 1st Semester is "<<y<<endl;
z=(bme*3+edc*4+ems*4+ode*3+la*3+cad*1)/18;
cout<<"The Spga in 2nd Semester is "<<z<<endl;
x=(y+z)/2;
cout<<"The Cgpa is "<<x<<endl;
      getche ();
      return 0;

}

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 comments:

Post a Comment

 

© 2013 All in One. All rights resevered. Designed by Templateism

Back To Top