77 919
Assignments Done
Successfully Done
In August 2019

Answer to Question #15308 in C++ for Me

Question #15308
Write a program that outputs all prime numbers less than 1000
Expert's answer

bool is_simple(int count){
for(int i =2; i < count; i++){
& if(count % i == 0)
return false;
return true;

void main(){

for (int i=1;i<1001;i++)
& if (is_simple(i)) cout<<i<<"\n";


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions