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 / biswa

void main()
{
int i=2;
int count=0;
int n;
printf("enter a no");
scanf("%d",&n);
for(i=2;i<n/2;i++)
{
if(n%i==0)
{
count++;
}
if(count>1)
{
prinf("prime");
else
printf("not prime");
}

Is This Answer Correct ?    311 Yes 310 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

975


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2560


What is #line?

1003


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

2041


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1526


What is use of bit field?

1235


What does struct node * mean?

964


What is bubble sort technique in c?

931


What is scanf () in c?

1054


Can the curly brackets { } be used to enclose a single line of code?

1119


Can we add pointers together?

999


What is variable declaration and definition in c?

855


What’s the special use of UNIONS?

1105


Is there a way to jump out of a function or functions?

1027


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

2296