Computer Fundamentals & Programming (Exercise)
Computer Fundamentals & Programming (Exercise)
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 5: Stop
Flowchart
START
Initialize all
variables:
MiDistance,
KmDistance
Read/Input the
value of
MiDistance
KmDistance =
(MiDistance)*1.609
END
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.
Process:
Algorithm:
else
Step 7: Stop
Flowchart
START
Initialize all
variables
MiDistance,
KmDistance
Read/Input the
value of Salary
Read/Input the
name of Employee
Salary
Y N
If Salary is
<
1,000.00
END