0% found this document useful (0 votes)
65 views7 pages

Gpa and Cgpa Calculator": The Overall Coding Is Attached at The End of The Assignment

This document describes a C++ program that calculates grade point averages (GPA) and cumulative grade point averages (CGPA) for students. It takes marks from various subjects as input, calculates the GPA for each subject, and then calculates the semester GPA and overall CGPA. It also handles exceptions like marks being out of range or failing grades. Pseudocode and sample outputs are provided to demonstrate how the program works.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views7 pages

Gpa and Cgpa Calculator": The Overall Coding Is Attached at The End of The Assignment

This document describes a C++ program that calculates grade point averages (GPA) and cumulative grade point averages (CGPA) for students. It takes marks from various subjects as input, calculates the GPA for each subject, and then calculates the semester GPA and overall CGPA. It also handles exceptions like marks being out of range or failing grades. Pseudocode and sample outputs are provided to demonstrate how the program works.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

GPA

AND CGPA
CALCULATOR
I have made a logic of calculation of GPA
and CGPA calculation here I will display
each subject of its own GPA and Also a
CGPA screenshots are attached to each
different logic

NOTE: The overall coding is attached at


the end of the assignment

What is GPA?
ANS: The grades that you receive in your high school classes
are all averaged together to arrive at one cumulative grade,
which is then converted into your GPA. The traditional GPA
scale ranges from 0.0 to 4.0.

What is CGPA?
ANS: CGPA means Cumulative Grade Point Average.
CGPA is calculated based on all subjects that u
take. each subjects usually comes with a credit
value. some less important subjects carry between
1 to 2 credits, more important ones carry 3 to 4

Here in this coding I have made a Gpa calculator on


the basis of marks

Means if I put marks it will show me each subject


individual GPA and then when we enter full subject
marks it will show me the first semester GPA the
screenshot is attached

Now for the second semester result and the CGPA


result will be calculated as shown below in
diagram..

Now what if I exceed the marks above


100???????????????????? What will happened lets
see below..
So it will show me out of Range as shown

If the GPA is less then 50 it will show me failed

The overall screen shot which I performed in visual studio


is

Here is the overall codding of all the GPA & CGPA


calculator All the logics are there in coding..
#include "stdafx.h"
#include <conio.h>
#include <iostream>
using namespace std;
void main()
{
cout<<endl<<"press any key to continue ENTER to continue...";
cin.clear();
cin.sync();
cin.get();
cout<<endl<<"this will show 1st semester result...";
cin.clear();
cin.sync();
cin.get();
float eng,phy,pak,cal,isl,islgpa,pgpa,pakgpa,enggpa,calgpa,cgpa;
cout<<"please enter your english marks :";
cin>>eng;
if (eng>0 && eng<=49)

cout<<"sorry you are fail the max marks to pass is 50 +"<<endl;


else if (eng>100)
cout<<"sorry out of range \n";
enggpa=(eng*4)/100;
cout<<"your english gpa is : ";
cout<<enggpa<<endl;

cout<<"enter your islamiyat marks :";


cin>>isl;
if (isl>0 && isl<=49)
cout<<"sorry you are fail the max marks to pass is 50 +"<<endl;
else if (isl>100)
cout<<"sorry out of range"<<endl;
islgpa=isl*4/100;
cout<<"your isl gpa is : ";
cout<<islgpa<<endl;

cout<<"enter your calculas marks : ";


cin>>cal;
if (cal>0 && cal<=49)
cout<<"sorry you are fail the max marks to pass is 50 +"<<endl;
else if (cal>100)
cout<<"sorry out of range \n";
calgpa=(cal*4)/100;
cout<<"your calculas gpa is :";
cout<<calgpa<<endl;

cout<<"enter your pakstudy marks : ";


cin>>pak;
if (pak>0 && pak<=49)
cout<<"sorry you are fail the max marks to pass is 50 +"<<endl;
else if (pak>100)
cout<<"sorry out of range \n";
pakgpa=(pak*4/100);
cout<<"your pakstudy gpa is :";
cout<<pakgpa<<endl;
cout<<"enter your applied physics marks :";
cin>>phy;
if (phy>0 && phy<=49)
cout<<"sorry you are fail the max marks to pass is 50 +"<<endl;
else if (phy>100)
cout<<"sorry out of range \n";
pgpa=(phy*4/100);
cout<<"your physics gpa is ;";
cout<<pgpa<<endl;
cgpa=((islgpa+calgpa+pgpa+pakgpa+enggpa)/5);
cout<<"your first semister gpa is :";
cout<<cgpa<<endl;
cout<<endl<<"this will show 2nd semester result press enter...";
cin.clear();

cin.sync();
cin.get();
float dld,pf,lca,de,dldgpa,pfgpa,lcagpa,degpa,cgpa2;
cout<<"please enter your dld marks : ";
cin>>dld;
if (dld>0 && phy<=49)
cout<<"sorry you are fail the max marks to pass is 50 +"<<endl;
else if (dld>100)
cout<<"sorry out of range \n";
dldgpa=dld*4/100;
cout<<"your dld gpa is :";
cout<<dldgpa<<endl;
cout<<"please enter your programing fundamental marks : ";
cin>>pf;
if (pf>0 && pf<=49)
cout<<"sorry you are fail the max marks to pass is 50 +"<<endl;
else if (pf>100)
cout<<"sorry out of range \n";
pfgpa=pf*4/100;
cout<<"your programing fundamental grades is : ";
cout<<pfgpa<<endl;
cout<<"please enter your linear circuit Analysis marks : ";
cin>>lca;
if (lca>0 && lca<=49)
cout<<"sorry you are fail the max marks to pass is 50 +"<<endl;
else if (lca>100)
cout<<"sorry out of range \n";
lcagpa=lca*4/100;
cout<<"your linear circuit gpa is :";
cout<<lcagpa<<endl;
cout<<"please enter your differential equations marks :";
cin>>de;
if (de>0 && de<=49)
cout<<"sorry you are fail the max marks to pass is 50 +"<<endl;
else if (de>100)
cout<<"sorry out of range \n";
degpa=de*4/100;
cout<<"your differential equations gpa is :";
cout<<degpa<<endl;
cout<<"your 2nd semester gpa is : ";
cgpa2=(dldgpa+pfgpa+lcagpa+degpa)/4;
cout<<cgpa2<<endl;
float cgpa3;
cout<<"your cgpa is :";
cgpa3=(cgpa+cgpa2)/2;
cout<<cgpa3<<endl;
getch();
}

You might also like