+ 2
[SOLVED]what's wrong with my code?
7 Réponses
+ 2
2 scanner object in one program won't work here. You can do anything with one scanner object. Then why 2?
For that problem input contains 3 lines of input.. So take 3 lines of input by nextLine() method. And convert 2nd one to int type by Integer.parseInt(input)..
But better to complete basics to solve hard problems.. So first learn basics well before giving an attempt. Hope it helps.. Happy coding..
+ 1
but it works fine on my computer in bluej
+ 1
Jayakrishna🇮🇳 thanks
+ 1
and finally my problem solved.
thanks guys 👍👍😊😊