I'm trying to make something that looks like this:
Move # to #
. For example, Move 1 to 3
I tried System.out.print("move " + input.nextInt() + " to " + input.nextInt())
This works fine, but I don't know how to assign values from those inputs.
This works, but it's NOT what I want:
System.out.print("move ");
int first = input.nextInt();
System.out.print(" to ");
int second = input.nextInt();
I don't want this, because instead of move # to #
, it gives this:
move #
to #
How can I keep all inputs in a single line while still assigning the input values to variables?
In order, I want the line to look like this:
before first input:
Move _
after first input:
Move # to _
after second input:
Move # to #