source file name: Primeno.C

#include<stdio.h>

int  main()

{

int n,t;

int d;

// clrscr();

printf("\n prime numbers between 1 to 100\n ");

for(t=1;t<=100;t++)

{

n=t;

d=2;

while(d<n)

{

if(n%d==0)

{

break;

}

else

d++;

}

if(d==n)

printf(" %d ",n);

}

//getch();

return 0;

}

output: