Assignemnt #101 Even Functions

Code

 /// Name:JJ Deng
    /// Period: 6
    /// Program Name: Even Function
    /// File Name: EvenFunc.java
    /// Date Finished: 3/28/2016
    
    public class EvenFunc
{
	public static void main( String[] args )
	{
		for (int i = 0; i < 20; i++)
		{
			System.out.println((i + 1) +" "+ (isEven(i + 1) ? "<" : "") + (isDiv3(i+1)? "=":"") );
		}
	}

	public static boolean isEven(int n)
	{
		return (n%2==0);
	}

	public static boolean isDiv3(int n)
	{
		return (n%3==0);
	}
}




    

Picture of the output

Assignment 105