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...

how to find the maximum of 10 numbers ?

Answer Posted / prits

#include <iostream>
using namespace std;

void main()
{
int max = 0;
int arr[10];
cout<<"Enter 10 numbers"<<endl;
for(int i = 0; i<=10; i++)
{
cin>>arr[i];
}
for(int i = 0; i<=10; i++)
{
if(arr[i]>max)
max =arr[i];

}

cout<<"Maximun of the 10 numbers is "<<max<<endl;

}

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What things would you remember while making an interface?

956


What is the main purpose of overloading operators?

1075


What is helper in c++?

1045


List the merits and demerits of declaring a nested class in C++?

990


What do you mean by translation unit in c++?

1297


What does h mean in maths?

1122


What problems might the following macro bring to the application?

989


Mention the storage classes in c++.

1039


What is ios in c++?

1171


What is a singleton c++?

951


What is the difference between the compiler and the preprocessor?

1054


List the advantages of inheritance.

1081


Give example of a pure virtual function in c++?

1102


Is sorted c++?

1057


Define anonymous class.

1035