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 is meant by entry controlled loop?

1182


How do you find out if a linked-list has an end? (I.e. The list is not a cycle)

1221


Are c and c++ different?

1029


What is conditions when using boolean operators?

1313


What is the difference between map and hashmap in c++?

1163


Briefly describe a B+ tree. What is bulk loading in it?

1399


How do you print a string on the printer?

1082


how to connect with oracle 9i with server in socket program in c/c++

2397


int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}

1326


What do you mean by stack unwinding in c++?

1290


Distinguish between new and malloc and delete and free().

1075


Is c++ still in demand?

1200


How to tokenize a string in c++?

1112


How do you invoke a base member function from a derived class in which you’ve overridden that function?

1172


What is lazy initialization in c++?

1156