answersLogoWhite

0


Best Answer

We cannot show flowcharts in a text-only forum. However, here's the pseudo-code which will help you construct a flowchart. Note that % is the modulo operator (remainder after integer division):

  1. num := 1
  2. if (num < 2) then goto 9
  3. if (num % 2 = 0) and (num = 2) then goto 8 else goto 9
  4. div := 3
  5. if (num % div = 0) then goto 9
  6. div := div + 2
  7. if (div < sqrt (num)) then goto 5
  8. print num
  9. num := num + 1
  10. if (num <= 1000) then goto 2
User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make a flow chart which shows all the prime number from 1 to 1000?
Write your answer...
Submit
Still have questions?
magnify glass
imp