Programming and Computer Science in Java:
Quiz #5b:   Lab #1, Exercises 1-28
    David Kosbie, 2002-2003
See Course Home Page

Quiz Date:  Mon, Mar 24, 2003

Question 1: Write a Java program which reads in an integer in [0,100), and makes appropriate change for that many cents.  So, if the user enters, say, 73, your program should print that the change is 2 quarters, 2 dimes, and 3 pennies.

Question 2: Write a Java program which repeatedly reads in a positive integer n (quitting when n <= 0), and prints out n factorial.

Question 3: Write a Java program which first reads in an integer N, followed by N more integers, and then prints out the following information (not counting the number N in your statistics):
a) The largest integer entered;
b) The smallest integer entered;
c) The sum of all the integers entered;
d) The average of all the integers entered. 


See Course Home Page