Computer Science, asked by hiteshthakur8624, 1 year ago

A c++ program to print the prime no.s between 100-200

Answers

Answered by naman6418
0
#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