From 16a8005f1dbd4889ec3da22ea718c051d67c2ce8 Mon Sep 17 00:00:00 2001 From: Neha Kanwar Date: Tue, 28 May 2024 00:25:36 +0530 Subject: [PATCH] Corrected the calculation in CGPA Percentage Calculator (#914) --- Calculators/CGPA-Percentage-Calculator/README.md | 2 +- Calculators/CGPA-Percentage-Calculator/script.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Calculators/CGPA-Percentage-Calculator/README.md b/Calculators/CGPA-Percentage-Calculator/README.md index 571650ca2..283211aed 100644 --- a/Calculators/CGPA-Percentage-Calculator/README.md +++ b/Calculators/CGPA-Percentage-Calculator/README.md @@ -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. diff --git a/Calculators/CGPA-Percentage-Calculator/script.js b/Calculators/CGPA-Percentage-Calculator/script.js index e6d429200..f1985a215 100644 --- a/Calculators/CGPA-Percentage-Calculator/script.js +++ b/Calculators/CGPA-Percentage-Calculator/script.js @@ -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