177k views
3 votes
Write an algorithm and draw a flowchart for switching off a machine after it has made 500 glass bottles. use an appropriate conditional statement for this

please hurry i need urgent

User Dosytres
by
7.2k points

1 Answer

1 vote

Answer:

Algorithm

1. Begin

2. num_bottles = 0

3. While num_bottles != 500

3.1 Create bottle

3.2 num_bottles = num_bottles + 1

4. Switch off machine

5. End

The flowchart has been added as an attachment

Step-by-step explanation:

Begin algorithm

1. Begin

Initialize bottles to 0

2. num_bottles = 0

Repeat loop until 500 bottles is created

3. While num_bottles != 500

Create a new bottle

3.1 Create bottle

Increment the number of bottles by 1

3.2 num_bottles = num_bottles + 1

End Loop

Switch off the machine after loop ends

4. Switch off machine

End algorithm

5. End

Write an algorithm and draw a flowchart for switching off a machine after it has made-example-1
User Revy
by
7.0k points