write a java program to accept a student'a
name,
his marks in the three subjects and
Print this result Sheet
in the following
farmat:
NAME
ENGLISH MARKS
COMPUTER MARKS:
MATHS MARKS
TOTAL MARKS =
PER CENT
GRADE
А
to the student based on
the
Assign grade to the
Yollowing grade scale
percent <50D
percent y =50 but <60C
percent >= 60 but <80B
percent y = 80
A.
Answers
Answer:
Hw to write....
maine abhi nhi pada
Explanation:
import java.util.Scanner;
class Marks
{
public static void main(String args[])
{
int marks[] = new int[6];
int i;
float total=0, avg;
Scanner scanner = new Scanner(System.in);
{
for(i=0; i<6; i++)
{
System.out.print("Enter Marks of Subject" +(i+1)+":");
marks[i] = scanner.nextInt();
total = total + marks[i];
}
scanner.close();
avg = total/6;
System.out.print("The student Grade is: ");
if(avg>=80)
{
System.out.print("A");
}
else if(avg>=60 && avg<80)
{
System.out.print("B");
}
else if(avg>=40 && avg<60)
{
System.out.print("C");
}
else
{
System.out.print("D");
}
}
}
Do like this same
Do please follow me for further helps
Or in first line
import java.util.*;
Can,alao be like this if you don't want to use scanner Class then remove
import java.util.Scanner;
Scanner scanner = new Scanner(System.in);
These two lines
Please do follow me for further helps