

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Quiz; Class: OBJECT-ORIENTED PROG I; Subject: Computer Science; University: University of Maryland; Term: Spring 2005;
Typology: Quizzes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


CMSC131 Spring 2005, Quiz #2, Duration 15 Minutes
First Name: Last Name: Student Id: Section: TAs:
Write a Java program that reads two values representing the lower bound and upper bound of a positive integer range, and then prints the even values of that range. For example, for the range [7, 12] your program will generate the values 8 10 12. Each value should be printed on a line by itself. If the lower bound is greater than or equal to the upper bound your program should print the message “Invalid Range”. The following restrictions/assumptions apply to this problem: