import java.util.Scanner;
public class FirstProgram
{
public static void main(String[]args)
{
Scanner input = new Scanner(System.in);
int x = 3;
int num1, num2, num3, num4;
while (x <= 3)
{
System.out.println("enter a number 1,2,3>");
num1 = input.nextInt();
num2 = input.nextInt();
num3 = input.nextInt();
num4 = input.nextInt();
{
if (num1 == 1)
{
System.out.println("lets add two numbers");
System.out.println(2+2);
}
if (num2 == 2)
{
System.out.println("lets multiply the two numbers:");
System.out.println(2*67);
}
if (num3 == 3)
System.out.println("congratulations!!!!!!");
}
if(x>3)
{
System.out.println("you have entered an invalid number try again");
}
}
}
}
simple programm, im trying to make the user choose from 1-3, if 1 two numbers add, if choose 2, two numbers multiply if 3 list prints out if greater than three invalid message
problem is it asks me to enter all the numbers then performs the calculations
can someone help