OUTPUTimport java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
int num1, num2;
String shape, operation, pass;
System.out.print("Enter Operation: ");
operation = input.readLine();
System.out.print("Enter Number 1: ");
num1 = Integer.parseInt(input.readLine());
System.out.print("Enter Number 2: ");
num2 = Integer.parseInt(input.readLine());
Enter Operation: +
Enter Number 1: 3
Enter Number 2: 5
* end of program *
But our professor wants us to have an output like this,
OUTPUT
Input: 3+5
He wants us to input 3 variables (int[3], String[+], int[5]) in one line. Is there a command that can return the cursor to the previous line so that after I enter "3", I can enter "+" next to it and not on the next line. Same goes with "5". Or is there other way to do this?