79. WAP to program to print prime numbers from 50 to 100
#include<stdio.h>
void
main()
{
int i,j,c;
printf("WAP to program to print
prime numbers from 50 to 100\n");
for(i=50;i<=100;i++)
{
for(j=2,c=0;j<i;j++)
{
if(i%j==0)
c++;
}
if(c==0)
printf("%d
",i);
}
printf("\n");
}
Comments
Post a Comment