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

#include<iostream.h>

main()
{
int a[10],n;
cout<<"enter ten numbers:\n";
for(int i=0;i<10;i++)
{
cin>>a[i];
}
int max=a[0];
for(i=0;i<10;i++)
{
if(a[i]>max)
max=a[i];
}
cout<<"the maximum number is:"<<max<<endl;
}

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between C and C++.

1166


Can you pass a vector to a function?

909


How can I learn c++ easily?

1014


What is constructor in C++?

1012


Which coding certification is best?

968


Explain unexpected() function?

1038


What is the role of C++ shorthand's?

1221


What is public, protected, private in c++?

1097


What is endl?

1074


What is purpose of abstract class?

1015


Is c++ low level?

991


What is atoi in c++?

1013


How much is c++ certification?

990


Why do we use iterators?

1011


Why is c++ not purely object oriented?

959