To calculate the total of five subject marks and print the total along with name , class , section , subject marks and total.aANSWER PLEASE
Answers
Answer:
14
Brainly User
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);
}
Explanation:
HOPE IT HELPS YOU DEAR☺
HAVE A NICE DAY AHEAD ❤❤❤