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
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
What is the maximum length of an identifier?
What are called c variables?
Are pointers integer?
C program to find all possible outcomes of a dice?
What is getch c?
If the size of int data type is two bytes, what is the range of signed int data type?
Why calloc is better than malloc?
Write a program to print ASCII code for a given digit.
What is a program flowchart and explain how does it help in writing a program?
What are pointers really good for, anyway?
Is file a keyword in c?
What is difference between structure and union in c programming?
What is #include cctype?
Is null a keyword in c?