Post by alaska on Sept 15, 2006 18:03:18 GMT
Yeah, so who cares about a n00bish haxxor Java Program, eh?
So feel free to tear apart and learn. Level I would say is intermedite.
/* Thermometre with Menu
25 August, 2006 through 31 August, 2006
Absent - Nick Burrus p4 Harrell
*/
import TerminalIO.KeyboardReader;
public class thermometre {
public static void main (String [] args) {
KeyboardReader reader = new KeyboardReader();
int mc;
int c;
int f;
double fahr;
double cels;
mc = reader.readInt("\nWelcome to Thermometre Degrees Converter! Make your selection to continue:\n1) Convert from Fahrenheit to Celsius\n2) Convert from Celsius to Fahrenheit\n3) Quit Program\n4) Harrell is a n00b\nSelect an option ");
if (mc == 4) {
System.out.println("Steve Harrell is a n00b :P");
}
else if (mc == 3) {
System.out.println("Press the Enter Key to exit. Thank you for trying out Thermometre Degrees Converter! \nPlease remember that Steve Harrell is a n00b!"); }
else if (mc == 2){
c = reader.readInt("Enter degrees Celsius: ");
fahr = c * 9.0 / 5.0 + 32.0;
System.out.println("The Equivalent in Fahrenheit is " + fahr + " degrees. \nThank you for trying out this program\nPlease remember that Steve Harrell is a n00b!");
}
else if (mc == 1){
f = reader.readInt("Enter degrees Fahrenheit: ");
cels = (f - 32.0) * 5.0 / 9.0;
System.out.println("The Equivalent in Celsius is " + cels + " degrees. \nThank you for trying out this program.\nRemember that Steve Harrell is a n00b!");
}
}
}
I'll be glad to answer questions if needed.
So feel free to tear apart and learn. Level I would say is intermedite.
/* Thermometre with Menu
25 August, 2006 through 31 August, 2006
Absent - Nick Burrus p4 Harrell
*/
import TerminalIO.KeyboardReader;
public class thermometre {
public static void main (String [] args) {
KeyboardReader reader = new KeyboardReader();
int mc;
int c;
int f;
double fahr;
double cels;
mc = reader.readInt("\nWelcome to Thermometre Degrees Converter! Make your selection to continue:\n1) Convert from Fahrenheit to Celsius\n2) Convert from Celsius to Fahrenheit\n3) Quit Program\n4) Harrell is a n00b\nSelect an option ");
if (mc == 4) {
System.out.println("Steve Harrell is a n00b :P");
}
else if (mc == 3) {
System.out.println("Press the Enter Key to exit. Thank you for trying out Thermometre Degrees Converter! \nPlease remember that Steve Harrell is a n00b!"); }
else if (mc == 2){
c = reader.readInt("Enter degrees Celsius: ");
fahr = c * 9.0 / 5.0 + 32.0;
System.out.println("The Equivalent in Fahrenheit is " + fahr + " degrees. \nThank you for trying out this program\nPlease remember that Steve Harrell is a n00b!");
}
else if (mc == 1){
f = reader.readInt("Enter degrees Fahrenheit: ");
cels = (f - 32.0) * 5.0 / 9.0;
System.out.println("The Equivalent in Celsius is " + cels + " degrees. \nThank you for trying out this program.\nRemember that Steve Harrell is a n00b!");
}
}
}
I'll be glad to answer questions if needed.