Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected the calculation in CGPA Percentage Calculator #914

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Calculators/CGPA-Percentage-Calculator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Description :-

Quickly convert your CGPA to percentage and vice versa with the CGPA ⟷ Percentage Calculator. On the basis of formula `Percentage = CGPA * 7.1 + 11` and `CGPA = (Percentage - 11) / 7.1` this calculator will help you to convert your CGPA to percentage and vice versa.
Quickly convert your CGPA to percentage and vice versa with the CGPA ⟷ Percentage Calculator. On the basis of formula `Percentage = CGPA * 9.5` and `CGPA = Percentage / 9.5` this calculator will help you to convert your CGPA to percentage and vice versa.

Start typing in any field and the value will be calculated automatically.

Expand Down
4 changes: 2 additions & 2 deletions Calculators/CGPA-Percentage-Calculator/script.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// functions to convert values
function cgpaToPercentage(cgpa) {
return cgpa * 7.1 + 11
return cgpa * 9.5
}

function percentageToCGPA(percentage) {
return (percentage - 11) / 7.1
return percentage / 9.5
}

// Function to handle conversion and display values
Expand Down