0

How can i make output like this

OHow can make output like this ( 100 is the highest mark ) I just can make output ( highest in english ) or math or science.. so how can i do it :) https://code.sololearn.com/clIT7Nnz4KeN/?ref=app This is my try

17th Oct 2020, 3:04 PM
STOP
STOP - avatar
8 Respuestas
0
System.out.println(english+" is the highest mark");
17th Oct 2020, 7:06 PM
JavaBobbo
JavaBobbo - avatar
+ 3
Your program giving correct Output what you expecting and English marks is also highest if u will change it like 40 ,30 .... then it will show next subject marks are highest.
17th Oct 2020, 3:12 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
Bushra Zhrani ohh i understood What you saying you can print number simply . See this try on solo ide public class Program { public static void main(String[] args) { int math = 87; int english = 100; int science = 50; if (math>english && math>science){ System.out.println("math is greater " + math); } else if (english>math && english>science){ System.out.println("higher mark in english "+english); } else if (science>math && science>english){ System.out.println("highest in science "+ science); } else { System .out .println ("there are two marks equal or otherwise"); } } }
17th Oct 2020, 3:18 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
You can write System.out.print (math) after conditions
17th Oct 2020, 3:24 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
Try this one public class Program { public static void main(String[] args) { int math = 87; int english = 100; int science = 50; if (math>english && math>science){ System.out.print(math); System.out.println(" is the highest mark"); } else if (english>math && english>science){ System.out.print(english); System.out.println(" is the highest mark"); } else if (science>math && science>english){ System.out.print(science); System.out.println(" is the highest mark"); } else { System .out .println ("there are two marks equal or otherwise"); } } }
17th Oct 2020, 3:27 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
the output is correct but i need the text of the output starting with the number of the highest mark then is the highest mark
17th Oct 2020, 3:15 PM
STOP
STOP - avatar
0
https://code.sololearn.com/cmQ6rnhe5Frd/?ref=app I want the number in the first, not last now it's ( the highest mark 100) I need it ( 100 is the highest mark ) how can i
17th Oct 2020, 3:18 PM
STOP
STOP - avatar
0
how can i please show me
17th Oct 2020, 3:25 PM
STOP
STOP - avatar