This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Using the "input stream reader" functions, write a java program to determine the smallest and largest of two numbers.
1. create some variables named number1, number2, smallest, and biggest (all numbers should be integers).
input the values of the variables number1 or number2 from the keyboard (using input stream reader).
2. print out the sentence "The larger number is " followed by the value that is larger (either the value of number1 or number2) - use the if statement to find out which variable holds the larger value.
3. print out the sentence "The smaller number is " followed by the value that is smaller (either the value of number1 or number2) - use the if statement to find out which variable holds the smaller value.
4. test your program by inputting different values for the variables number1 and number2.