Name: Anonymous 2012-10-02 17:08
i need a program that finds all the primes under an arbitrary number and puts them on the console
have it ready by thursday at noon you faggots
have it ready by thursday at noon you faggots
long long primes[] ={ 2, 3, 5, 7, 11, 13, 17, 23}; // TODO: ADD THE REST OF THE PRIMES HERE
long long num = 8; // number of primes goes here
int main()
{
int input = 0;
printf("number:");
scanf("%d",&input);
for(int i = 0; i < num; i++)
{
if(primes[i] < input)
{
printf("%d",primes[i]);
}
}
return 0;
}