0% found this document useful (0 votes)
2K views

PP3 - Seat Work Exercises - Flowchart - Conditional (Dagdag)

The document provides two flowcharts for conditional logic problems. The first flowchart determines the value of R based on the difference between numbers X and Y. The second flowchart calculates employee bonuses based on their monthly salary - if the salary is less than 1,000 pesos the bonus is 50% of salary, otherwise the bonus is 1,000 pesos. Both flowcharts include steps to read input values, perform conditional checks, calculate outputs, and print results.

Uploaded by

John Dagdag
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

PP3 - Seat Work Exercises - Flowchart - Conditional (Dagdag)

The document provides two flowcharts for conditional logic problems. The first flowchart determines the value of R based on the difference between numbers X and Y. The second flowchart calculates employee bonuses based on their monthly salary - if the salary is less than 1,000 pesos the bonus is 50% of salary, otherwise the bonus is 1,000 pesos. Both flowcharts include steps to read input values, perform conditional checks, calculate outputs, and print results.

Uploaded by

John Dagdag
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

PP3 - Seat Work Exercises - Flowchart -Conditional

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 1: Read in the values of X and Y

Step 2: Subtract Y from X

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.

Step 4: Print out the values of X, Y and R

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:

Step1: Read in the employee’s name and salary

Step2: Test if the employee’s salary is less than 1,000,00

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.

Step4: Print out the employee’s name and bonus

Flowchart:

START A

Read Bonus=5 Y Is N Bonus


Name,
- Salary Salary =1000
Salary
<1000
B
Print B
A Name.
Bonus

END

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy