Computer Science, asked by Anonymous, 5 days ago

help me computer java​

Attachments:

Answers

Answered by Navvya1207
1

Answer:

import java.util.Scanner;

public class abc

{

public static void main (String args [ ])

{

Scanner scan=new Scanner(System. in);

System.out.println("Enter a percentage");

int p=scan.nextInt();

if (p>=80)

System.out.println("Distinction");

else if (p<80 && p>=60)

System.out.println("First Division");

else if (p<60 && p>=45)

System.out.println("Second division");

else if (p<45 && p>=40)

System.out.println("P%ss");

else

System.out.println("Pr&m&ti&n not gr%nted");

}

}

Explanation:

  • Creating scanner class for input
  • Letting the user to input their percentage
  • Using if else block to check for the percentages and printing the desired output
Answered by yadavakahs764
0

Answer:

hii

Explanation:

thankyou so much and good evening

Similar questions