Computer Science, asked by mirajmisba, 3 months ago

. Write a program in java (Using Scanner) to calculate the average of three subjects and

print “VERY GOOD” if average more than 80, print “GOOD” if average between 50 to

80, Otherwise print “YOU CAN DO BATTER RESULT”.​

Answers

Answered by chowdhurymita49
0

Answer:

import java.util.Scanner ;

public class marks

{

public static void main (String args [ ])

{

Scanner sc= new Scanner(System.in)

int sum =0;

int a = sc.nextInt();

int b =sc.nextInt();

int c = sc.nextInt();

System.out.println("Enter your marks in three subjects");

sum=a+b+c;

float avg=sum/3;

if (avg>80)

System.out.println("VERY GOOD");

if ( avg<80&&avg >50)

System.out.println("GOOD");

else

System.out.println("YOU CAN DO BETTER RESULT ");

}

}

Explanation:

Please be more specific and take better care while you write your question if what you write is not understandable it is your online test or home work which may go wrong

Similar questions