answersLogoWhite

0

Still curious? Ask our experts.

Chat with our AI personalities

ReneRene
Change my mind. I dare you.
Chat with Rene
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
More answers

The flow goes something like this for an input number N.

If N < 2, exit NOT PRIME.

If N < 4, exit PRIME.

If (N%2) = 0, or (N%3) = 0, exit NOT PRIME.

If N < 25, exit PRIME.

Set D = 5, E = 2 and M = trunc(sqrt(N))

Repeat:

if (N%D) = 0, exit NOT PRIME.

D = D+E, E = 6-E

If D > M, exit PRIME, else go to Repeat.

User Avatar

Wiki User

13y ago
User Avatar

You don't write flowcharts, you draw them. Being a text-based forum we cannot show images here, however the related links section contains a link to a flowchart for the creation of the Fibonacci sequence.

User Avatar

Wiki User

11y ago
User Avatar

Option of drawing a flowchart is not available here. But I can give you the program -

#include<iostream.h>

#include<conio.h>

int main()

{

clrscr();

for(int i=1;i<101;i++)

{

if (i%2!=0)

cout<<i<<endl;

}

return 0;

}

User Avatar

Wiki User

12y ago
User Avatar

Not possible, because there is no such thing as 'biggest even number'

User Avatar

Wiki User

13y ago
User Avatar

print 3715891200what is this

User Avatar

Wiki User

13y ago
User Avatar

pls ans this

User Avatar

Wiki User

12y ago
User Avatar

step 1:

print "2 4 6 8 10"

User Avatar

Wiki User

14y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Draw a flow chart for printing 'n' prime numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp