29th Mar 2022, 8:17 AM
Jay Ravidas
Jay Ravidas - avatar
1 Answer
+ 4
1. Add import Java.util.Scanner; 2. In main method parameters, add String args[] (This is really important, without this our code will compile, but it won't run.) 3. Remove comment for Scanner 4. Inside first for loop, it should be sc.nextInt(); https://code.sololearn.com/csOK07qU2a16/?ref=app
29th Mar 2022, 8:33 AM
kev_coding
kev_coding - avatar