Professional Documents
Culture Documents
Is Greater Than
Is Greater Than
/*
* IsGreaterThan program (filename IsGreaterThan.java)
* Created by 1,000_naymes for ICT 352
* Program compare two variables and decides is the first is greater than the second
*/
import java.util.Scanner;
public class IsGreaterThan
{
public static void main( String[] args )
{
// Processing
comparingInts = integer1 > integer2;
comparingInts2 = integer3 > integer4;
comparingInts3 = integer5 > integer6;
// Output
integer1Message = "Integer 1: " + integer1;
integer2Message = "Integer 2: " + integer2;
outputMessage = "The statement '" + integer1 + " > " + integer2 + "' is " +
comparingInts +"\n";
Page 1