VILL- DEBANDI, AMTA, HOWRAH PIN-711410 Phone-9836357266
#include <stdio.h>
int checkPrime(int N)
{
int flag = 1;
for (int i = 2; i <= N / 2; i++) {
if (N % i == 0) {
flag = 0;
break;
}
return flag ;
int main()
for(int i=1;i<=100;i++)
if(checkPrime(i)&&i!=1)
printf("%d ",i);
return 0;
No comments:
Post a Comment