Write a program in java to accept marks out of 100 in Physics, Chemistry and Biology of a student and calculate the percentage of marks scored in the science group. Print output with appropriate message
now plz fast.
Answers
Answered by
2
Answer:
import java.util.*;
class percentage
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the physics marks out of 100: ");
float a = sc.nextFloat();
System.out.println("Enter the chemistry marks out of 100: ");
float b = sc.nextFloat();
System.out.println("Enter the biology marks out of 100: ");
float c = sc.nextFloat();
System.out.println("The percentage of science is "+((a+b+c)/300.0 * 100.0));
}
}
mark it as the brainliest answer if you like it
Explanation:
Similar questions
Math,
3 months ago
Science,
3 months ago
India Languages,
6 months ago
English,
11 months ago
Hindi,
11 months ago