1. Write a program that determines the largest of a set of numbers.  The user will be asked in advance how many numbers they want to enter.  A sample run could look like this:

    How many numbers do you want to enter? 5
    Number? 6

    Number? 8
    Number? 2
    Number? 7
    Number? 4
    The largest number was 8.

  2. How many lines of output are produced by the following code, and how many are blank?  Write the output.
    System.out.print("Programming\n");
    System.out.println("\n\tis");
    System.out.println();
    System.out.print("lots of fun.");


  3. Given the following declarations and assignments:

    boolean a = true, b = false;

    evaluate the following expressions and underline the portion (if any) that will not be evaluated because of short-circuit evaluation.

    1. b && a || a
    2. !a || !(a && b)
    3. (a || b) && b

  4. Given the following variable declarations and assignments:

    double x, y;
    x= -1.2;
    y = 5.0;

    evaluate the following expression (make sure your answer is in the correct data type):

    1. (int) (x * y) - (int) x * y

  5. These numbers are in binary or decimal.  Convert to the other number system.