0

Multiple inputs dont work in my code on "CODE PLAYGROUND"

Can someone help me realize multiple inputs in my code (https://code.sololearn.com/cigHoiGI6Xip). Maybe I made some mistake in code. Spliting inputs on different lines dont work in my case. FOr example: first line - I entered "5" second line - I entered "10" Inputs from first line is work, but second value have null value. Thank you in advance.

3rd Jul 2019, 6:52 PM
Š”ŠøŠ¼Š° Š›ŠµŠ±ŠµŠ“ŠµŠ²
Š”ŠøŠ¼Š° Š›ŠµŠ±ŠµŠ“ŠµŠ² - avatar
3 Answers
+ 1
The issue is the fact that you have two scanner objects. That wonā€™t effectively compute on an online compiler. To make it work: Remove the declaration of the second scanner named ā€œscā€ and use your first scanner object named ā€œscannerā€ for both blocks (youā€™ll need to move the declaration of ā€œscannerā€ outside of the method body, like to the top of the password class for example)
3rd Jul 2019, 7:33 PM
Jake
Jake - avatar
+ 3
Thank you, Jake! Your advice help me. Now everithing works.
5th Jul 2019, 6:13 PM
Š”ŠøŠ¼Š° Š›ŠµŠ±ŠµŠ“ŠµŠ²
Š”ŠøŠ¼Š° Š›ŠµŠ±ŠµŠ“ŠµŠ² - avatar
+ 1
Please put the link to your code in the body of your question. If it is in the tags we cannot use the link.
3rd Jul 2019, 7:31 PM
sneeze
sneeze - avatar