PP3 - Seat Work Exercises - Flowchart - Conditional (Dagdag)
PP3 - Seat Work Exercises - Flowchart - Conditional (Dagdag)
1. Given two numbers X and Y. Draw a flowchart to determine the difference between X
and Y. If X-Y is negative, compute R=X+Y, if X-Y is zero, compute R=2X+XY; and if
X-Y is positive, compute R=X*Y. Print out the values of X, Y, and R.
Algorithms:
Step 3: If the difference between X-Y is negative. Computer R=X+Y, if zero, compute
R=2x+XY; and if X-Y is Positive, Compute R=X*Y.
Flowchart:
START
A
READ X, R=X+Y
If R=X*Y
Y
Diff
B
Diff=X, Y Print X,
Y, R B
R=2X+2
Y
A END
B
2. The ABC Manufacturing Company plans to give a year-end bonus to each of its
employees. Make a flowchart that will input the name and the salary then compute the
bonus of an employee. Consider the following criteria: If the employee’s monthly salary
is less than 1,000.00 pesos, the bonus is 50% of the salary; for the employees with
salaries greater than 1,000.00 pesos, the bonus is 1,000.00. Print out the name and
corresponding bonus of the employee.
Algorithms:
Step3: If the salary is less than 1,000,00 pesos, the bonus is 50% of the employee’s salary.
However, if the salary is more than 1,000.00 pesos the bonus is 1,000,00 pesos.
Flowchart:
START A
END