draw a flow chart to print odd numbers below 20 in descending order

1 answer

knowing that they differ by 2, start at 19

1: n=19
2: print n
3: n=n-2
4: n>0?
5a: yes: go to step 2
5b: no: stop

Or, you could test every number against some criterion. In this case, divisibility by 2.

1: n=20
2: divide n by 2
3: remainder=0?
4: yes: print n
5: n=n-1
6: n>0?
7a: yes: go to step 2
7b: no: quit