0

how to give input value if input variable more than 2 someone please tell me

14th May 2018, 10:03 AM
Kendy
Kendy - avatar
8 Respostas
+ 1
I beg your pardon? May you explain yourself?
15th May 2018, 4:35 AM
Eldar Bakerman
+ 1
my name is kendy i live in indonesia i just want to enter university
15th May 2018, 11:06 AM
Kendy
Kendy - avatar
+ 1
I did not ask that. What did you mean by "if input variable more than 2"?
15th May 2018, 11:18 AM
Eldar Bakerman
+ 1
oh
16th May 2018, 3:56 AM
Eldar Bakerman
+ 1
The Scanner is not one value, it changes with each input. To use it, first declare on it: Scanner scan = new Scanner (System.in); Then, request a user for an input: Syso ("Type in a number: "); //Ask from Scanner to get the input as an Integer int num1 = scan.nextInt (); //next Line () for String Syso ("Type in a String: "); String str = scan.NextLine (); //To declare a String as input and go to the next line //Type scan.Next to just declare the String as input, without going to the next line Syso ("Type in a rational number: "); double num2 = scan.nextDouble ();
16th May 2018, 4:05 AM
Eldar Bakerman
+ 1
Please mark my answer as best
16th May 2018, 12:07 PM
Eldar Bakerman
0
like this https://code.sololearn.com/c1fyVAOFyrsb/?ref=app Scanner(System.in)more than 2 variable
15th May 2018, 12:20 PM
Kendy
Kendy - avatar
0
ok thx for your help
16th May 2018, 11:47 AM
Kendy
Kendy - avatar