Ask a New Question

Question

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

Answers

Steve
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
8 years ago

Related Questions

how to draw a flow chart to find isoscles triangle Draw a flow-chart and Write a program that asks the user to enter students grades. The program shoul... draw a flow chart and write algorithms description that accept three mark of students and print the... draw flow chart & write pseudo code for greatest common divisor of two numbers Draw flow chart and write algorithm description that accepts three marks of the student then print t... Draw a flow chart to display the total and average of maths marks of 50 students. Draw a flow chart to show what happens when you visit a library Draw a flow chart to represent the logic of a program that allows the user to enter five values. Th... draw flow chart pseudocode to ask a name age display name age how to draw a flow chart to input the score of students in 8courses and find the average
Ask a New Question
Archives Contact Us Privacy Policy Terms of Use