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
Explain how can I prevent another program from modifying part of a file that I am modifying?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
What is break statement?
How do you use a 'Local Block'?
What is static memory allocation?
What is 2c dna?
using for loop sum 2 number of any 4 digit number in c language
Explain the term printf() and scanf() used in c language?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
What is the difference between test design and test case design?
When do we get logical errors?
What are the advantages of using Unions?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
What is stack in c?