Write a program to print all the prime numbers with in the
given range
Answer Posted / chavidi
void prime(int a,int b)
{
int i,j,c
for(i=a;i<=b;i++)
{
c=0;
for(j=1;j<=a;j++)
{
if(a%j==0)
{
c++;
}
}
if(c==2)
printf(i);
}
}
| Is This Answer Correct ? | 8 Yes | 14 No |
Post New Answer View All Answers
What do you know about the use of bit field?
Explain what does the format %10.2 mean when included in a printf statement?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
Can true be a variable name in c?
Create a simple code fragment that will swap the values of two variables num1 and num2.
Explain what is output redirection?
#include
What is the best style for code layout in c?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
What is this infamous null pointer, anyway?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
What is the use of clrscr?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
What are the application of void data type in c?
How do you construct an increment statement or decrement statement in C?