write the program for prime numbers?
Answer Posted / arfu
#include<stdio.h>
int main()
{
int c,i,n;
c=0;
scanf("%d",&a);
for(i=2;i<a;i++)
if (n%i==0)
{
c=1;break;
}
if(c!=1)`("prime");
else printf ("not a prime");
}
| Is This Answer Correct ? | 110 Yes | 89 No |
Post New Answer View All Answers
What is 02d in c?
What is cohesion and coupling in c?
Write a program to generate the Fibinocci Series
What is preprocessor with example?
Explain 'far' and 'near' pointers in c.
What is the difference between call by value and call by reference in c?
Is int a keyword in c?
Differentiate between full, complete & perfect binary trees.
In c programming language, how many parameters can be passed to a function ?
how many key words availabel in c a) 28 b) 31 c) 32
How many levels of pointers have?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What are Macros? What are its advantages and disadvantages?
Why we not create function inside function.
i want to know the procedure of qualcomm for getting a job through offcampus