Write a program in java to :-
Attachments:
Answers
Answered by
3
package com.company;
import java.util.Scanner;
public class Main {
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the percentage");
int per = sc.nextInt();
if (per>=70){
System.out.println("Grade A");
}
else if (per>=50 && per<70){
System.out.println("Grade B");
}
else if (per<50){
System.out.println("Grade F");
}
}
}
You can Change the class name, package etc. of your choice. Hope this program helps.
Similar questions