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 the use of structure padding in c?
WHAT IS HIGH LEVEL LANGUAGE?
Create a simple code fragment that will swap the values of two variables num1 and num2.
What are the types of type qualifiers in c?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
What are bitwise shift operators in c programming?
What is the difference between array and pointer?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
Program to find largest of three numbers without using comparsion operator?
can we declare a function in side the structure?
What are data types in c language?
What is the main difference between calloc () and malloc ()?