write the program for prime numbers?
Answer Posted / santhoshi
main()
{
for(int i=1;i<100;i++)
{
count=0;
for(j=1;j<=100;j++)
{
if(i%j==0)
{
count++;
}
}
if(count==2)
{
printf(i);
}
}
getch();
}
| Is This Answer Correct ? | 12 Yes | 12 No |
Post New Answer View All Answers
What are different storage class specifiers in c?
What is a header file?
Why is c still so popular?
Is register a keyword in c?
What is structure of c program?
What are the different properties of variable number of arguments?
What is structure pointer in c?
By using C language input a date into it and if it is right?
How many main () function we can have in a project?
How do you declare a variable that will hold string values?
Why do we use c for the speed of light?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
What is malloc() function?
What's the best way of making my program efficient?
Is c++ based on c?