/* Name: Joseph Schuman Date: 1/22/2015 File: Chapter 3 Assignment Descripetion: */ import java.util.Scanner; public class CPT236RandomSwap { public static void main(String[] args) { //Generate random numbers. int number1 = (int)(Math.random() * 100); int number2 = (int)(Math.random() * 100); //If number1 > number2, swap values. if (number1 > number2) { int temp = number1; number1 = number2; number2 = temp; } //Display the result. System.out.println(number1 + " is less than " + number2); } }