Assignment #105 Evenness Method

Code

    /// Name: Koosha Kimelman
    /// Period: 7
    /// Program Name: Evenness Method
    /// File Name: EvennessMethod.java
    /// Date Completed: 4/1/16
    
    public class EvennessMethod {
    
        public static void main(String[] args) {
        
            for (int x = 1; x <= 20; x++) {
                System.out.print(x + " ");
                if (Two(x) == true)
                    System.out.print("<");
                if (Three(x) == true)
                    System.out.print("=");
                System.out.println();
            }
        }
        
        public static boolean Two(int n) {
            boolean r;
            
            if (n % 2 == 0)
                r = true;
            else
                r = false;
            
            return r;
        }
        
        public static boolean Three(int n) {
            boolean r;
            
            if (n % 3 == 0)
                r = true;
            else
                r = false;
                
            return r;
        }
    }
    

Picture of the output

Assignment 105