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 RAM memory? and What is ROM?Who designed one is temparary and another is permanent?why they designed like that?By using far pointer which type data(whether hexadecimal)we can access?
Write a program to display the no of bit difference between any 2 given numbers eg: Num1 will 12->1100 Num2 will 7->0111 the difference in bits are 2.
difference of two no's with out using - operator
what is call by value and call by reference
CopyBits(x,p,n,y) copy n LSBs from y to x starting LSB at 'p'th position.
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
what are # pragma staments?
Are pointers integers in c?
What are 3 types of structures?
Can we assign string to char pointer?
why r u join this company? give solid resons.
16 Answers IBM, Infosys, TCS,
What does the message "warning: macro replacement within a string literal" mean?