Ask your own question, for FREE!
Computer Science 21 Online
OpenStudy (anonymous):

How to write a program of prime number's series from 1-100 in C++

OpenStudy (anonymous):

first of all you need a for loop from 2 to 100 , and a function called prime (int x) (for example) that determines weather the number x is prime or not , for (int x=2; x<=100;x++) if (prime (x)==true) cout << x; this is just a hint , if u need anything else we'r here to help

OpenStudy (anonymous):

prime number detection, either with citation or(in pseudocode): for i=2 -> sqrt(x) i++ if(x mod i == 0) x->prime -> quit end loop x->not prime

OpenStudy (anonymous):

He is not going to learn anything if you just give him the answer...

OpenStudy (anonymous):

He is going to learn a lot if he studies the algorithm i gave him...

OpenStudy (anonymous):

and besides that i just gave him a pseudocode, he wants a c++ program..

OpenStudy (anonymous):

I understand what you gave him, but he needs to ask for questions, not answers. Pseudocode is the answer minus proper syntax.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!