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 |
main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }
write a program to print the all 4digits numbers & whose squares must me even numbers?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
What is conio h in c?
Difference between data structure and data base.
7 Answers CTS, Value Labs, Zoho,
What is a symbolic constant?
What is the meaning of int *x[]();?
implement OR gate without using any bitwise operator.
What is the size of array float a(10)?
Is malloc memset faster than calloc?
write a program in c to print **** * * * * ****
while running a program, i got the msg that press return key to exit.what that mean in C as there are no such options as far i know.