Computer Science, asked by Vidayanaca, 1 year ago

write a program in C++ to print the prime numbers between 100-200

Answers

Answered by Rajnesh46
2
#include <iostream>

using namespace std;

int main()

{

int low = 100;

cout << "Prime numbers between " << 100 << " and " << 200 << " are: ";

while (low < 200)

{

flag = 0;

for(i = 2; i <= low/2; ++i)

{

if(low % i == 0)

{

flag = 1;

break;

}

}

if (flag == 0)

cout << low << " ";

++low;

}

return 0;

}
Similar questions