Besic Marks Percentage Calculator Using Java

·

1 min read

A Simple Java Programme To Generate Percentage of marks

public class cbspercentage { public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.print("Enter All Marks: "); double A = input.nextDouble(); double B = input.nextDouble(); double C = input.nextDouble(); double D = input.nextDouble(); double E = input.nextDouble(); double F = input.nextDouble(); double H = A+B+C+D+E+F; if (A>100){ System.out.println("Wrong Entry in Bengali"); } if (B>100){ System.out.println("Wrong Entry in English"); } if (C>100){ System.out.println("Wrong Entry in Mathematics"); } if (D>100){ System.out.println("Wrong Entry in Science"); } if (E>100){ System.out.println("Wrong Entry in Geography"); } if (F>100){ System.out.println("Wrong Entry in History"); } System.out.println("Total Marks: "+H); System.out.println("Marks Percentage: "+H/6);

}

}