write a program to find the given number is prime or not
Answers were Sorted based on User's Feedback
Answer / alex
here is answer
http://www.prepjunk.com/151/program-to-find-the-given-number-is-prime-or-not
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / rabindra nath das
#include<stdio.h>
#include<conio.h>
void main()
int n,k,fl=0,r;
clrscr();
printf("\n Enter the number==>>");
scanf("%d",&d);
for(k=2;k<=n/2 && fl==0;k++)
{
r=n%k;
if(r==0);
fl=1;
}
if(fl==0)
printf("\n %d is a prime number",n);
else
printf("\n %d is not prime number",n);
getch();
}
| Is This Answer Correct ? | 1 Yes | 3 No |
Why we use int main and void main?
Where are c variables stored in memory?
write a program to find out number of on bits in a number?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
Explain the difference between ++u and u++?
When is a “switch” statement preferable over an “if” statement?
Is there any demerits of using pointer?
a=5 a=a++/++a
What is the difference between printf and scanf )?
What is array in C
Do you know what are bitwise shift operators in c programming?
Why we not create function inside function.