write the program for prime numbers?
Answer Posted / pritam neogi
#include<stdio.h>
#include<conio.h>
void main()
{
int no,i,count=0;
clrscr();
printf("enter the no");
scanf("%d",&no);
for(i=1;i<=no;i++)
{
if(no%i==0)
{
count=count+1;
}
}
if(count<=2)
{
printf("this is prime no");
}
else
{
printf("this is not prime");
}
getch();
}
| Is This Answer Correct ? | 32 Yes | 16 No |
Post New Answer View All Answers
Differentiate between ordinary variable and pointer in c.
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 is a list in c?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
How to set file pointer to beginning c?
How can I open files mentioned on the command line, and parse option flags?
Can two or more operators such as and be combined in a single line of program code?
How can you avoid including a header more than once?
Using which language Test cases are added in .ptu file of RTRT unit testing???
What is difference between arrays and pointers?
What will be your course of action for a push operation?
Is file a keyword in c?
Write a progarm to find the length of string using switch case?
Is there any data type in c with variable size?
Explain the ternary tree?