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 |
What is a shell structure examples?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
What is the acronym for ansi?
Can I initialize unions?
advantages of pointers?
to convert a string without using decrement operater and string functions
What is the output of the below program and how it is? void main() { static int var=5; printf("%d",var--); if(var) main(); }
8 Answers MindFire, TCS, Tech Mahindra,
what is the hexidecimal number of 4100?
What is a macro in c preprocessor?
int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d", i);
What are header files why are they important?
how many argument we can pas in in a function