GPA CALCULATOR USING C++
By Alankrita Singh
This code written in C++ calculates the GPA on taking into account the grade and credit for all the courses entered by the user.
- The double variables S, A, B, C, D, E stand for –
S- 100 % -> 10.
F-40% or less-> 0
- Integer variable “n” is used to store the number of subjects entered by the user.
- Char variable “grade” is used to store grade of a particular subject.
- Double variable “credit” stores the credit of the course entered.
- total_credit stores the sum of the credits of all the subjects.
- cal_credit calculates the marks by multiplying the credit of the course to the grade received for the subject.
- total_cal_credit stores the sum of all the marks calculated by cal_credit in each loop.
- gpa” calculates the gpa by dividing the total marks (total_cal_credit) by the total credits (total_credits).