

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: Unknown 1989;
Typology: Quizzes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


CMSC131 Fall 2004 Quiz #
Name (Print last name followed by first name): Student Id: Section time (10am/11am): TAs:
Write a Java program that determines the product of a range of positive integer values. Your program will read two values representing the lower bound and upper bound of the range, compute the product of integers in the range, and print the result. For example, if the lower bound is 3 and the upper bound is 5, your program will output the product 60 (which is 345). If the lower and upper bounds are equal, the product will just be the lower bound. If the lower bound is greater than the upper bound the product will be 1. Because the product might be large, you should store it in a variable of type “long.” The following restrictions/assumptions apply to this problem: