0% found this document useful (0 votes)
3 views7 pages

Module04 - OOP

Uploaded by

Brianna Velasco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

Module04 - OOP

Uploaded by

Brianna Velasco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Meynard D.

Velasco
BSIT 2D

Module 4: REPETITION CONTROL STRUCTURES


Hands – on Activity
Problem 01:
Write a program that would input 10 numbers and then output the highest number.
Output the lowest number as well.
Problem 02:
Write an application that displays all even numbers from 2 to 100 inclusive, and that
starts a new line after every multiple of 20 (20, 40, 60, and 80).

Problem 03:
Mucho Dinero has P20,000.00 in his savings account. Write a program that would enter
a series of numbers terminated by a 0 sentinel. A positive number would mean a deposit in his
account and a negative number would mean a withdrawal. For each numbered entered the
outstanding balance must be displayed. The program should also check whether the amount to
be withdrawn has sufficient funds. If there is not, the message “INSUFFICIENT FUNDS!” must be
displayed.
Problem 04:
Write a program that would display the number series below:
1 1 2 3 5 8 13 21 34 . . . . A pattern must be established in displaying the
numbers. The program will ask the user how many sequence he wants.

Problem 05:
JMC Enterprises has only 3 salesmen and for the month of July 2011, these 3 salesmen
made 15 sales transaction combined. Make a program to input the 15 sales amount and the
salesman code denoting the salesman who made the sales. Use code 1 for salesman1, code 2
for salesman 2 and code 3 for salesman 3. The program should validate the value of the sales
amount (must be between 1000 and 99999) and salesman code (must be between 1 and 3). If
invalid, display the message “INVALID ENTRY!” and then accept another value to disregard the
invalid entry.
Skills Workout
1. Assign1.java

2. Assign2.java

You might also like