[SOLVED]what's wrong with my code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
9th Aug 2020, 2:28 PM
hamid
hamid - avatar
4 Answers
+ 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..
9th Aug 2020, 4:04 PM
Jayakrishna ๐Ÿ‡ฎ๐Ÿ‡ณ
+ 1
but it works fine on my computer in bluej
9th Aug 2020, 3:58 PM
hamid
hamid - avatar
9th Aug 2020, 4:14 PM
hamid
hamid - avatar
+ 1
and finally my problem solved. thanks guys ๐Ÿ‘๐Ÿ‘๐Ÿ˜Š๐Ÿ˜Š
9th Aug 2020, 4:23 PM
hamid
hamid - avatar