Untitled


SUBMITTED BY: Guest

DATE: March 26, 2013, 2:59 a.m.

FORMAT: Text only

SIZE: 1.1 kB

HITS: 1103

  1. So im in my first java coding and I need some help.
  2. Im making a fairly simple program using a busy box format where multiple dialog boxes pop after another asking for input and giving a output response.
  3. Well I have to use a switch statement and I cant use any of the known coding shortcuts because he wants use to practice using if statements.
  4. Well I have to ask the user to input three number for one of the options then I have to have the program order there numbers in numerical order using If elseif statements but cant figure out how to do it (I think im just having a massive brain fart)
  5. but here is that chunk of code.
  6. num1 = JOptionPane.showInputDialog("Enter first number: ");
  7. number1 = Integer.parseInt(num1);
  8. num2 = JOptionPane.showInputDialog("Enter second number:");
  9. number2 = Integer.parseInt(num2);
  10. num3 = JOptionPane.showInputDialog("Enter third number: ");
  11. number3 = Integer.parseInt(num3);
  12. now this is where I would need to start the if statements to order the numbers but im to stupid to figure it out :shrug:

comments powered by Disqus