+ 1
Program a report card with 3 subject
since i am just 11 year old I have started learning java so ple... help me
3 Respuestas
+ 11
/*enter marks in subject ::: maths, science & english (out of 100)
example :::
input ::: 75 88 90
output :::
maths = 75
science = 88
english = 90
percent = 84.3333333333 ☺
*/
import java.util.*;
public class Program
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
double x=sc.nextDouble();
double y=sc.nextDouble();
double z=sc.nextDouble();
double n=(x+y+z)/3.0;
System.out.println("maths = "+x+"\nscience = "+y+"\nenglish = "+z+"\npercent = "+n);
}
}
+ 13
what output u want
+ 1
gaurav i want this outpot
maths. = 75
science. = 88
english. = 90
percent. = 83.3333333333