Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write the program for prime numbers?

Answer Posted / pritam neogi

#include<stdio.h>
#include<conio.h>
void main()
{
int no,i;
clrscr();
printf(" Enter the Number U want to check:");
scanf("%d",&no);
i=2;
while(i<=no-1)
{
if(no%i==0)
{
printf(" %d is not Prime number",no );
// break;
}
i=i+1;
}
if(no==i)
printf("%d is a prime Number",no);
getch();
}

Is This Answer Correct ?    24 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you return multiple values from a function?

1051


Write a program to reverse a given number in c language?

1050


Explain how can you restore a redirected standard stream?

1030


Here is a good puzzle: how do you write a program which produces its own source code as output?

1036


How can I send mail from within a c program?

984


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1042


What is ## preprocessor operator in c?

1025


Differentiate between functions getch() and getche().

988


What is zero based addressing?

1110


How are structure passing and returning implemented?

985


What is the scope of global variable in c?

953


What is calloc in c?

1080


Why isnt any of this standardized in c?

1020


Explain how can I manipulate strings of multibyte characters?

1158


What is the concatenation operator?

1090