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

Define a pointer to a data member of the type pointer to pointer?

1038


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

1002


What is a lambda function c++?

1197


What are protected members in c++?

1180


Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?

1327


What is DlgProc?

1079


Where Malloc(), Calloc(), and realloc() does get memory?

1104


Explain how functions are classified in C++ ?

1298


Give 10 points of differences between C & C++.

1194


What problems might the following macro bring to the application?

1099


What are abstract data types in c++?

1040


Do we have to use initialization list in spite of the assignment in constructors?

1056


What is wrapper class in c++?

1199


What do you understand by a pure virtual member function?

1067


Can we use this pointer inside static member function?

1118