Check
-
Scheiss, man. I cannot thank you enough for your help. Again, i owe this entire semester to you. Just know that.
Even though you didnt have the correct answer, you still pointed out mine was wrong. I dont know if what i changed since then is right, but i just want to thank you for all your support. You've been very helpful
I wont hand this in till i hear from you. I have till midnight to hand it in.
Take a look and tell me what you think.
Even though you didnt have the correct answer, you still pointed out mine was wrong. I dont know if what i changed since then is right, but i just want to thank you for all your support. You've been very helpful
Code:
// FixDebugFive4.java
// Jason Sodano
// October 30th, 2010
import javax.swing.*;
public class FixDebugFive4
{
public static void main (String args[])
{
int one, two, three, four;
String str, output;
// Inputs the numbers in order to determine the highest number.
str = JOptionPane.showInputDialog(null,"Enter an integer");
one = Integer.parseInt(str);
str = JOptionPane.showInputDialog(null,"Enter an integer");
two = Integer.parseInt(str);
str = JOptionPane.showInputDialog(null,"Enter an integer");
three = Integer.parseInt(str);
str = JOptionPane.showInputDialog(null,"Enter an integer");
four = Integer.parseInt(str);
// Determines which is the highest number.
if(one > two && one > three && one > four)
output = "Highest is " + one;
else
if(two > one && two > three && two > four)
output = "Highest is " + two;
else
if(three > one && three > two && three > four)
output = "Highest is " + three;
else
output = "Highest is " + four;
// Outputs highest of four numbers
JOptionPane.showMessageDialog(null, output);
System.exit(0);
}
}
Take a look and tell me what you think.