You are on page 1of 3

HOLY ANGEL UNIVERSITY

COLLEGE OF INFORMATION AND COMMUNICATIONS TECHNOLOGY

LOGFORL – Y115 (AUGUST 14, 2008)


MACHINE PROBLEM 1

Company “BM” processes loan applications based on four items namely: monthly salary, monthly
deduction, status (1 for regular or 2 for casual), and years of service to the current employer. The
company's policy in granting loans is summarized as follows:

The amount being applied for a loan is:


'Approved' if all of the following conditions are met:
a) the amount of loan is not greater than twice the monthly salary
b) the monthly deduction is not greater than half of the monthly salary
c) the loan applicant is a regular employee or the years of service to the current employer is 3
years or more
"Disapproved' if at least one of the following conditions exist:
a) the amount of loan is greater than 3 times the monthly salary
b) the monthly deduction is greater than 1/2 of the monthly salary

Example Output:

**************************************************************
Welcome to BM Company’s Loan Processing Program!
***************************************************************
Please Enter your Salary: 10000
Please Enter your Deductions: 1000
Please Enter your Status [1-Regular/2-Casual): 1
Please Enter your Number of Years of Service: 10
Please Enter your Desired Loan: 1000
***************************************************************
THE LOAN IS: APPROVED!

Analysis:
The loan in the example above was approved because the amount of loan which is 1000 is not
greater than twice the monthly salary. Next, the monthly deduction of the example is only 1000 which
is not greater than half of the monthly salary. Finally, the loan applicant is a Regular Employee
manifested by the Status he entered (1 for Regular) and his number of years to the current employer
is already 10 years which is greater than the required 3 years.

Instructions:
1. Create a folder with the filename using this format : <LASTNAME>-<FIRSTNAME>
Example: CORTEZ-BROWN
2. For this machine problem, save it using the filename “ACT1.C” and put it in the folder
you have created.
3. Your instructor will collect the folders for checking.
HOLY ANGEL UNIVERSITY
COLLEGE OF INFORMATION AND COMMUNICATIONS TECHNOLOGY

LOGFORL – Y115 (AUGUST 14, 2008)


MACHINE PROBLEM 2

Donaldson & Duban Group of Companies gives year-end bonus to its employees based on their
number of years of service and their salary, using the following:
Years of Service Bonus
1 1% of salary
2 to 3 2% of salary
4 to 10 5% of salary
10 and above 10% of salary

Example Output:

**************************************************************
Welcome to Donaldson & Duban Group of Companies!
***************************************************************
Enter Number of Years of Service: 10
Enter your Salary: 100000
***************************************************************
Your Bonus is 10000

Analysis:
The example above got a bonus of 10000 because his number of years of service is already 10 and
above which entitles him to a 10% of salary bonus.

Instructions:
1. Create a folder with the filename using this format : <LASTNAME>-<FIRSTNAME>
Example: CORTEZ-BROWN
2. For this machine problem, save it using the filename “ACT2.C” and put it in the folder
you have created.
3. Your instructor will collect the folders for checking.
HOLY ANGEL UNIVERSITY
COLLEGE OF INFORMATION AND COMMUNICATIONS TECHNOLOGY

LOGFORL – Y115 (AUGUST 14, 2008)


MACHINE PROBLEM 3

Write a program that accepts four numbers from the user and displays the highest and the lowest.
Assume that there are no duplicate values.

Example Output:

Enter First Number: 10


Enter Second Number: 1
Enter Third Number: 2
Enter Fourth Number: 100
************************
Highest Number: 100
Lowest Number: 1

Analysis:
Since the problem is requiring you to display the highest and lowest number and assuming no
duplicate values will be entered, the program above displayed 100 as the highest number and 1 as
the lowest number.

Bonus: Additional points will be given for those who will be able to arrange the four numbers from
highest to lowest.

Example Output of Bonus Points:

Enter First Number: 10


Enter Second Number: 1
Enter Third Number: 2
Enter Fourth Number: 100
************************
Highest Number: 100
Lowest Number: 1
************************
Sorted Numbers: 100, 10, 2, 1

Instructions:
1. Create a folder with the filename using this format : <LASTNAME>-<FIRSTNAME>
Example: CORTEZ-BROWN
2. For this machine problem, save it using the filename “ACT3.C” and put it in the folder
you have created.
3. Your instructor will collect the folders for checking.

You might also like