Input student name, class, roll number, and marks in 5 subjects. Calculate the total marks and percentage and display the same.
Answers
Answer:
hjy7
Explanation:
please make me brainlist pleaseeeeee
import java.util.Scanner;
class name
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
{
System.out.println("enter your name");
String n = sc.nextLine();
System.out.println("enter class " );
int c = sc.nextInt();
System.out.println("enter roll no.")
int r = sc.nextInt();
System.out.print(" Please Enter the Five Subjects Marks : ");
int english= sc.nextInt();
int chemistry = sc.nextInt();
int computers = sc.nextInt();
int physics = sc.nextInt();
int hindi = sc.nextInt();
int total = english + chemistry + computers + physics + maths;
double Average = total / 5;
double Percentage = (total / 500) * 100;
System.out.println(n);
System.out.println(c);
System.out.println(r);
System.out.println(" Total Marks = " + total);
System.out.println(" Average Marks = " + Average);
System.out.println(" Marks Percentage = " + Percentage);
}
}
}