3 Answers
New Answer/*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); } }
gaurav i want this outpot maths. = 75 science. = 88 english. = 90 percent. = 83.3333333333
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message