Quiz Date: Wed, Mar 12, 2003
This document is also available as quiz4b.doc.
This is a written quiz, you may not use JCreator.
notes, no books, no calculators, no talking, etc…
Question 1: Write a Java program which reads in two integers, and prints out the integers which are between them. Your program must work whether the first or second number is the smaller one.
Question 2: Write a Java program which reads in integers, stopping only when the same integer is entered in twice in a row. Print out the total number of integers read.
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.