Skip to content

Commit

Permalink
Corrected the calculation in CGPA Percentage Calculator (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
nehashekhawat255 authored May 27, 2024
1 parent b67e47a commit 16a8005
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 16a8005

Please sign in to comment.