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

#include<iostrream.h>
#include<conio.h>
void main()
{
int n;
cin>>n;
if(n==2)
{
cout<<"no is prime")
if(n%2!=0)
{
if(n%3!=0)
{
if(n%5!=0)
{
if(n%7!=if(n%2!=0)
{
0)
{
if(n%11!=0)
{
if(n%13!=0)
{
cout<<"no is prime ";
}
}
}
}
}
}
}
}
}
getch()
}

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you determine whether to use a stream function or a low-level function?

1124


Linked lists -- can you tell me how to check whether a linked list is circular?

1081


What is a ternary operator in c?

1120


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

1047


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

1030


How reliable are floating-point comparisons?

1094


c program to compute AREA under integral

2394


Explain enumerated types.

1030


What does %p mean c?

1063


What are the different types of linkage exist in c?

1031


How can I ensure that integer arithmetic doesnt overflow?

1161


What is time null in c?

1069


What is integer constants?

1074


What does c mean before a date?

1174


I have seen function declarations that look like this

1041