Evennes

Code

public class Evennes
{
	public static void main( String[] args )
	{
		for (int num = 0; num < 20; num++)
		{
			if (ifEven(num) == true && ifDiv3(num) == true)
            {
                System.out.println(num + " <=");
            }
            else if (ifEven(num) == true && ifDiv3(num) == false)
            {
                System.out.println(num + " <");
            }
            else if (ifEven(num) == false && ifDiv3(num) == true)
            {
                System.out.println(num + " =");
            }
		}
	}

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

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

Evennes

Assignment 105