So thank you to all who replied. Big thank you too Norm I guess I really need to sit down sketch out the logic and then write the code.
Here is the rewritten working code.
import java.util.Scanner;
public class Calculator
{
public static void main(String[] args)
{
int choice, choice2, choice3;
float result;
Scanner scan = new Scanner (System.in);
do
{
System.out.println("What would you like to do? ");
System.out.println("1. Add");
System.out.println("2. Subtract");
System.out.println("3. Multiply");
System.out.println("4. Divide");
System.out.println("5. Exit");
System.out.print("Selection: ");
choice = scan.nextInt();
System.out.print("Enter first number: ");
choice2 = scan.nextInt();
System.out.print("Enter second number: ");
choice3 = scan.nextInt();
switch (choice)
{
case 1:
//Add 2 integers
System.out.println(choice2 + "+" + choice3 + "=" + (choice2 + choice3));
break;
case 2:
//Subtract 2 integers
System.out.println(choice2 + "-" + choice3 + "=" + (choice2 - choice3));
break;
case 3:
//Multiply 2 integers
System.out.println(choice2 + "*" + choice3 + "=" + (choice2 * choice3));
break;
case 4:
//Divide 2 integers
result = choice2 / choice3;
System.out.println(choice2 + "/" + choice3 + "=" + result);
break;
case 5:
//Exit
default:
//
break;
}
}while (choice != 5);
}
}