08/09/2022

Hello everyone,

Java Program to Calculate Grade of Students

so friends, (Calculate Grade of Students)in this java program, we will show you student percentage and grade here we using import java util scanner, and also subject enter by the user. first of all, open your NetBeans   or notepad on your PC

And we grade as well as percentage, Here we will take import java util scanner. And after that, we will again create a class by any name. After that, we will add the main class. After that, we’ll take three variables for the student’s subject. And take two variables separately for total and percentage. After that, we will total the three subjects and divide them by three for a percentage

Then we will give a percentage-wise grade to everyone using the switch case. We will put students above 80 percent in A+, grade, And put those between 70% and 80% in one grade. And we will fail those who have 30 percent

as well as login on learning point.in for improving your knowledge related to coding:-https://learningpoints.in/

As well as if you want to learn pattern so click here:-https://learningpoints.in/how-to-make-a-pattern-in-java/

I think I suggest we should share one more link with you for Java lovers

as well as we will share with you one more link for the mathematical program in Java. how to add two numbers in Java multiplication in Java subscription in Java division in Java how to do that:-https://learningpoints.in/java-mathematical-programming/

``````package project1;

import java.util.Scanner;

/**
*
* @author sharm
*/
public class stu {
public static void main(String[] args)
{
int a,b,c;
int total;
float per;

Scanner s =new Scanner(System.in);

System.out.println("enter a num 1");
a = s.nextInt();
System.out.println("enter a num 2");
b = s.nextInt();

System.out.println("enter a num 3");
c = s.nextInt();

total=a+b+c;

per=(float)(total/3);

switch ((int) per / 10){
case 9:
break;
case 8:
case 7:
break;
case 6:
break;
case 5:
break;

case 4:
break;
case 3:
break;
case 2:
System.out.println("fail");
break;
}

}
}
``````

this is a simple output image

Java Program to Calculate Grade of Students

if you want to learn more subjects related to programming.SO share our link with your friends and click on our website learning points.in and also share with your friend.

and do comment in below section.

Thank you.