1 Réponse
+ 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