I want compiler ask me for every user input | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I want compiler ask me for every user input

Scanner sc= new Scanner (System.in) Int a= sc.nextInt(); System.out.println("enter 1 number"); Int b= sc.nextInt(); System.out.println("enter second number"); // When ask 1 time then compiler should ask only for a not for b Please help

15th Apr 2020, 2:32 PM
¥!$!π
7 Answers
+ 5
The line "system...." Would be before the line "int...." Now I think that u can take input for a and b both
15th Apr 2020, 5:08 PM
Piyush
Piyush - avatar
+ 1
Ok
15th Apr 2020, 2:42 PM
¥!$!π
+ 1
Thanks you
15th Apr 2020, 2:46 PM
¥!$!π
0
The code is correct.. But, your doubt is not clear anymore.. If you are bothering about giving input in sololearn, you have to give all the inputs at a time whichever you want to give..
15th Apr 2020, 2:37 PM
sarada lakshmi
sarada lakshmi - avatar
0
Ok I want from compiler to ask me seperate for each user input
15th Apr 2020, 2:38 PM
¥!$!π
0
Is it possible
15th Apr 2020, 2:39 PM
¥!$!π
0
It's not possible in sololearn.. You have to give all inputs at a time
15th Apr 2020, 2:41 PM
sarada lakshmi
sarada lakshmi - avatar