write the program for prime numbers?
Answer Posted / samson mugambi
#include<stdio.h>
int main()
{
int c,i,n;
counter=0;
scanf("%d",&a);
for(i=2;i>a;i++)
if (n%i==0)
{
c=1;break;
}
if(c!=1) ("prime");
else print ("not a prime");
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What does struct node * mean?
How can you pass an array to a function by value?
#include
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist
What is the Purpose of 'extern' keyword in a function declaration?
Is it cc or c in a letter?
Tell me what are bitwise shift operators?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
Write a program to reverse a given number in c?
Where is c used?
What is %d used for?
What’s a signal? Explain what do I use signals for?
Is there any data type in c with variable size?
Which built-in library function can be used to match a patter from the string?