#105
Code
/// Name: Josh Bautista
/// Period: 6
/// Program Name: Everness Function
/// File Name: EM.java
/// Date Finished: 2/26/2015
public class EM
{
public static void main( String[] args )
{
int n = 1;
System.out.println();
while ( n < 21 )
{
System.out.print( n + " " );
if ( isEven(n) == true )
{
System.out.print( "<" );
}
if ( isDivisibleBy3(n) == true )
{
System.out.print( "=" );
}
System.out.println();
n++;
}
System.out.println();
}
public static boolean isEven( int n )
{
boolean result;
if ( n % 2 == 0 )
result = true;
else
result = false;
return result;
}
public static boolean isDivisibleBy3( int n )
{
boolean result;
if ( n % 3 == 0 )
result = true;
else
result = false;
return result;
}
}
Picture of the output