+ 1

Program a report card with 3 subject

since i am just 11 year old I have started learning java so ple... help me

10th Oct 2017, 2:08 PM
ashish
ashish - avatar
3 odpowiedzi
+ 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); } }
10th Oct 2017, 3:05 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 13
what output u want
10th Oct 2017, 2:20 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
gaurav i want this outpot maths. = 75 science. = 88 english. = 90 percent. = 83.3333333333
10th Oct 2017, 2:50 PM
ashish
ashish - avatar