Program a report card with 3 subject | Sololearn: Learn to code for FREE!

+1

Program a report card with 3 subject

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

10/10/2017 2:08:35 PM

ashish

3 Answers

New Answer

+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