This is the link to the code that I wrote.
It shows an error on compilation.
can you please help me by explaining to me what the error means and how to resolve it.
Not able to run code for problem "simple input" in java
@Revika,
https://ide.codingblocks.com/s/209432 This is the correct code.
You need to declare Scanner class object outside the for loop. Because everytime the loop runs a new object is declared which gives the compilation error.