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 to throw some light on the b tree?

1090


Differentiate between declaring a variable and defining a variable?

1045


Explain what is the difference between text files and binary files?

1160


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

2278


What is pass by reference in c?

1188


How can variables be characterized?

2191


What is meant by realloc()?

1155


What are the types of type specifiers?

1045


Multiply an Integer Number by 2 Without Using Multiplication Operator

768


difference between native and cross compilers

2131


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

1110


What is the meaning of 2d in c?

1127


In c language can we compile a program without main() function?

1137


What is the difference between array and pointer in c?

1162


Why do we use null pointer?

1070