I just can't run my program and That's because I don't know how to write the Input commands here. I wrote "reader.nextInt();" But it didn't work.. https://code.sololearn.com/ck4Wqhdu1Ypm/?ref=app
1/8/2020 7:48:52 PM
Israel Cohen3 Answers
New Answerhere it is import java.util.*; public class Program { public static void main(String[] args) { int Num, Max; /* Hello, please follow the commands bellow~ */ Scanner reader = new Scanner(System.in); Num=reader.nextInt(); Max = reader.nextInt(); if(Num>Max) Max=Num; else Max=Max; } }
Oh, thank you a lot. I guess I used to write it without the System in command cause when we learn at school we write codes in our Notebooks. Thank you for fixing my Program!
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message