Basically the goal of the program is to have the user input a number, increase is 3 times, then decrease it 3 times using unary operators. The issue is that when it's ran, the first "number is now ___" line ends up just showing the same number the user inputed rather than increasing it by one. New to Java, Don't really know why
import java.util.Scanner;
class U1_L4_Activity_One{
public static void main(String[] args){
int num;
Scanner startNum = new Scanner(System.in);
//Enter an int (num)
System.out.println("Enter starting number(must be an integer)");
num = startNum.nextInt();
//Increases num 3 times
System.out.println("number is now " + num++);
System.out.println("number is now " + num++);
System.out.println("number is now " + num++);
//Decreases num 3 times, back to original number
System.out.println("number is now " + num--);
System.out.println("number is now " + num--);
System.out.println("number is now " + num--);
}
}