Laboratory Outputs
ICTE 112 – Computer Fundamentals & Programming
MIRANDA, Bryan Nathaniel F. March 16, 2021
BSCE SE 1B
Midterm Exercise 03A
1. Ask for a distance in miles and convert it into distance in kilometers. Note that 1
mile is equal to 1.609 km.
Input/s: MiDistance
Output/s: KmDistance
Process:
1. KmDistance = (MiDistance)*1.609
Algorithm:
Step 1: Initialize all variables: MiDistance, KmDistance
Step 2: Read/Input the value of MiDistance
Step 3: Compute the value’s equivalent in kilometers,
where KmDistance = (MiDistance)*1.609;
Step 4: Print the value of KmDistance
Step 5: Stop
Ms. Stephanie Rose T. Basilio
Instructor, CICT
Laboratory Outputs
ICTE 112 – Computer Fundamentals & Programming
Flowchart
START
Initialize all
variables:
MiDistance,
KmDistance
Read/Input the
value of
MiDistance
KmDistance =
(MiDistance)*1.609
Print the value of
KmDistance
END
Ms. Stephanie Rose T. Basilio
Instructor, CICT
Laboratory Outputs
ICTE 112 – Computer Fundamentals & Programming
2. The ABC Manufacturing Company plans to give a year-end bonus to each of its
employees. Compute the bonus of an employee. Consider the ff. criteria: If the
employee’s monthly salary is less than 1, 000.00, the bonus is 50% of the salary; for
employees with salaries greater than or equal to 1,000.00, bonus is 1,000.00. Print out
the Name and corresponding bonus of the employee.
Input/s: Salary, Employee
Output/s: Bonus1, Bonus2
Process:
1. Bonus1 = (Salary) * 0.5
2. Bonus = 1,000.00
3. If salary < 1,000.00, then print Bonus 1
else print Bonus 2
Algorithm:
Step 1: Initialize all variables: Employee, Salary, Bonus1, Bonus2
Step 2: Read/Input the value of Employee
Step 3: Read/Input the name of Salary
Step 4: Compute the Bonus1, where Bonus1 = (Salary) * 0.5
Step 5: Compute the Bonus2, where Bonus2 = 1,000.00
Step 6: Compare the Salary to 1000, were
If Salary < 1,000.00
print the name of Employee, and the value of Bonus1
else
print the name of Employee, and the value of Bonus2
Step 7: Stop
Ms. Stephanie Rose T. Basilio
Instructor, CICT
Laboratory Outputs
ICTE 112 – Computer Fundamentals & Programming
Flowchart
START
Initialize all
variables
MiDistance,
KmDistance
Read/Input the
value of Salary
Read/Input the
name of Employee
Salary
Compute the Bonus1,
where Bonus1 =
Salary * 0.5
Compute the Bonus2,
where Bonus2 =
1,000.00
Y N
If Salary is
<
1,000.00
Print the name of Print the name of
Employee, and Employee, and
value of Bonus1 value of Bonus 2
END
Ms. Stephanie Rose T. Basilio
Instructor, CICT