├── .DS_Store ├── .gitattributes ├── view ├── Screenshot 2025-01-23 at 6.15.54 PM.png └── Screenshot 2025-01-23 at 6.16.23 PM.png ├── README.md └── main.cpp /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vishal2186/CGPA_Calculator/HEAD/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /view/Screenshot 2025-01-23 at 6.15.54 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vishal2186/CGPA_Calculator/HEAD/view/Screenshot 2025-01-23 at 6.15.54 PM.png -------------------------------------------------------------------------------- /view/Screenshot 2025-01-23 at 6.16.23 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vishal2186/CGPA_Calculator/HEAD/view/Screenshot 2025-01-23 at 6.16.23 PM.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CGPA Calculator 2 | simple calulator to calculate CGPA... 3 | >Note: It works on grade points so see the below chart if your university have different grading system. 4 | 5 |
6 | 7 |
8 | 9 | GRADE | MARKS RANGE | GRADE POINTS| 10 | ------|--------------|-------------| 11 | A+ | 91-100 | 10 | 12 | A | 81-90 | 9 | 13 | B+ | 71-80 | 8 | 14 | B | 61-70 | 7 | 15 | C+ | 51-60 | 6 | 16 | C | 41-50 | 5 | 17 | D | 40 only | 4 | 18 | F | below 40 | 0 | 19 | I | absent | 0 | 20 |
21 | 22 |

23 | 24 |

console View - - >

25 | 26 |

27 | 28 |
29 | 30 |

31 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | class subject 6 | { 7 | public: 8 | string subjectname; 9 | int credit; 10 | float gradepoint; 11 | 12 | subject(string name, int cr, float gp) 13 | { 14 | subjectname = name; 15 | credit = cr; 16 | gradepoint = gp; 17 | } 18 | 19 | }; 20 | 21 | class student 22 | { 23 | public : 24 | string name; 25 | vectorsubjects; 26 | 27 | student(string studentName) 28 | { 29 | name = studentName; 30 | } 31 | 32 | void addsubject(string subjectName, int credit ,float gradepoint) 33 | { 34 | subject newSubject(subjectName,credit,gradepoint); 35 | subjects.push_back(newSubject); 36 | } 37 | 38 | float calculatecgpa() 39 | { 40 | int totalcredit = 0; 41 | float weightgradepoint = 0; 42 | for(const subject & subject : subjects) 43 | { 44 | totalcredit += subject.credit; 45 | weightgradepoint += subject.credit * subject.gradepoint; 46 | } 47 | return ( totalcredit > 0 )?(weightgradepoint/totalcredit) : 0; 48 | } 49 | 50 | void displaycgpa() 51 | { 52 | cout<<"Student Name = "<