#include <cstdlib>
#include <iostream>
#include <conio.h>
using namespace std;
int i,j,n,t,say;
float z;
int main(int argc, char *argv[])
{
cout<<"enter the top limit";
cin>>n;
cout<<" ASAL SAYILAR ";
for(int i=2;i<=n;i++)
{ say=0;
for(int j=1;j<=i;j++)
{ int t=i/j;
float z=i/j;
if(t==z)
say++;
}
if(say==2)
cout<<"basic numbers"<<i;
}
getch(); return 0;
}


Alıntı ile Cevapla
Bu Konuyu Paylaşın !