/*11/20/2017
 * answers to some questions on Sample Exam 2 */

import java.util.Scanner;

public class ChecksCollected {
      public static void main(String[] args) {
        /*question 2 answer*/
           System.out.print("How many checks will you enter? ");
           Scanner input = new Scanner(System.in);
           int n = input.nextInt();
           double[] checks = new double[n];
           int totalMore100=0, totalLess100=0, count=0;
           for (int i=0;i<n;i++) {
             System.out.print("Enter check value: ");
             // read in value
             checks[i] = input.nextDouble();
             // check if it is 100 or more
             if (checks[i]>=100) {
                totalMore100+=checks[i];
                count++;
             }
             else
                totalLess100+=checks[i];
           }
           System.out.println("The total value of all checks less than"
                                + " 100 is: " + totalLess100);
           System.out.println("You collected " + count + " checks of $100 or more"
                                + " with a total of: " + totalMore100);
           // sample call to question 3
           int len=1890;
           boolean ans = isLong(len);
           if (ans) {
             System.out.println("your value is LONG.");
             
           if (isLong(len))
             System.out.println("your value of " + len + " is long.");
      }
  }
      /*question 3 answer*/
      public static boolean isLong(int length) {
        
        int feet, inches;
        feet = length/12;
        inches = length%12;
        System.out.println("the length is: " + feet + " feet, "
                             + inches + " inches.");
        if (feet>=100)
           return true;
        else
           return false;
      }      
}