Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
122 views

Galleta, Marc Anjelou M. Bscs 1-B

The document contains algorithms and flowcharts for two problems. The first is an algorithm and flowchart that takes in three numbers, calculates the sum, average, and product, and prints the results. The second is a flowchart that determines if an employee gets overtime or regular pay based on if they worked more or less than 40 hours in a week.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views

Galleta, Marc Anjelou M. Bscs 1-B

The document contains algorithms and flowcharts for two problems. The first is an algorithm and flowchart that takes in three numbers, calculates the sum, average, and product, and prints the results. The second is a flowchart that determines if an employee gets overtime or regular pay based on if they worked more or less than 40 hours in a week.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Galleta, Marc Anjelou M.

BSCS 1-B

Note: Write the Algorithm and the Flowchart. 10 points each number (5 points for the algorithm
and 5 points for the flowchart).

1. Write the algorithm and draw the flowchart. Given three numbers A, B, and C. Compute and
print out the sum, the product and the average of these values.
Algorithm:
1. Get the value of A, B, C
2. Compute the sum(A+B+C), average(sum/3), product(sum*average)
3. Print sum, average, product
Flowchart:

Start

Get the value of A, B, C

Compute the sum(A+B+C),


average(sum/3),
product(sum*average)

Print Sum
Print Average
Print Product

End
2. Draw a flowchart that determines if the employee has to be paid of overtime pay (OT). They
will be paid an OT if they exceed 40 hours work in a week, regular pay (RP) if less than or equal
to 40 hours only. Display “OT Pay” or “RP Pay”, based on this condition.
Flowchart:

Start

40 hours work in a week

YES >40 hours work NO


in a week?

overtime pay (OT) regular pay (RP)

End

You might also like