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 the functions to open and close file in c language?
What is a structure member in c?
Explain high-order bytes.
How can I do serial ("comm") port I/O?
What is #line?
What is string function in c?
Are comments included during the compilation stage and placed in the EXE file as well?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is the difference between new and malloc functions?
List some of the dynamic data structures in C?
Write a Program to find whether the given number or string is palindrome.
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
using for loop sum 2 number of any 4 digit number in c language
What is meant by errors and debugging?