#include <stdio.h>
#include <conio.h>
void main(void)
{
int baslangic = 0;
int bitis = 0;
int sayi = 0;
int n = 0;
char asal = 'E';
clrscr();
printf("\n Verilen araliktaki asal sayilar...");
printf("\n ==================================");
printf("\n Baslangic : ");
scanf("%i",&baslangic);
fflush(stdin);
printf("\n Bitis : ");
scanf("%i",&bitis);
fflush(stdin);
printf("\n\n %i ve %i arasindaki asal sayilar : ",baslangic,b itis);
printf("\n ===================================\n");
for( sayi = baslangic ; sayi <= bitis ; sayi++ )
{
asal = 'E';
for( n = 2 ; n < sayi ; n++ )
{
if( sayi % n == 0 )
asal = 'H' ;
}
if( asal == 'E' )
printf("\t%i",sayi);
}
getch();
}