Four workers were responsible to pluck oranges. The owner of the orange farm will be given 40% of the oranges. The workers share equally the balance of the oranges. The balance of oranges after divided will be used to make juice. Draw a complete flowchart and pseudocode that accepts input for the amount of oranges that were plucked. You are also required to calculate and print amount of oranges that were received by the owner, each of the workers and balance of oranges to make juice.
Sample output:
Enter number of oranges plucked : 100
Total oranges for the owner is 40
Total oranges for each worker is 15
Balance of oranges to make juice is 0
***********another output sample**************
Enter number of oranges plucked : 125 Total oranges for the owner is 50 Total oranges for each worker is 18 Balance of oranges to make juice is 3
pseudocode
Declare variables numberOranges, totalOranges, totalOrangesEachWorker, balanceJuice
Read the number of oranges plucked
totalOranges=numberOranges*0.4
totalOrangesEachWorker=(numberOranges-totalOranges)/4
balanceJuice=(numberOranges-totalOranges)-(4*totalOrangesEachWorker)
Display the total oranges for the owner
Display the total oranges for each worker
Display the balance of oranges to make juice
flowchart
Comments
Leave a comment