write a program in c++ to print the prime numbers between 100 to 200
Answers
Answered by
3
#include <stdio.h>
void main()
{
int i, j;
for(int i=100;i<=200;i++)
{
for(int j=2;j<i;j++)
{
if(i%j==0)
break;
else if(i==j+1)
printf("%d\n",i);
}
}
}
GargiShukla:
thanks a lot
Similar questions
English,
7 months ago
Computer Science,
7 months ago
Science,
7 months ago
Science,
1 year ago
Hindi,
1 year ago