belongs to collection: Simple Formula Based Java Programs
Java Program To Calculate CGPA Percentage
In this demo I have used NetBeans IDE 8.2 for debugging purpose. But you can use any java programming language compiler as per your availability..
class CGPA { public static void main(String arg[]) { int num = 5; double mm[] = new double[num]; double gg[] = new double[num]; double cgpa, sum = 0; mm[0] = 95; mm[1] = 85; mm[2] = 75; mm[3] = 80; mm[4] = 95; for (int i = 0; i < num; i++) { gg[i] = (mm[i] / 10); } for (int i = 0; i < num; i++) { sum += gg[i]; } cgpa = sum / num; System.out.println("CGPA = " + cgpa); System.out.println("percantage from CGPA = " + cgpa * 9.5); } }
Result:
CGPA = 8.6
percantage from CGPA = 81.7
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
In this demo I have used NetBeans IDE 8.2 for debugging purpose. But you can use any java programming language compiler as per your availability..
Result:
CGPA = 8.6
percantage from CGPA = 81.7
need an explanation for this answer? contact us directly to get an explanation for this answer