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

int a[]=new int[10];
int max=a[0];

for(int i=0; i<10; i++)
{
if(a[i]>max)
{
max=a[i];
}
}
System.out.println("Maximum of 10 :" + max);

Is This Answer Correct ?    21 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain class invariant.

988


Explain what you mean by a pointer.

1052


Name the implicit member functions of a class.

1031


What is the difference between a "copy constructor" and an "assignment operator" in C++?

1014


Why cstdlib is used in c++?

994


What is the main purpose of overloading operators?

1053


Can class objects be passed as function arguments?

1009


What are separators in c++?

1034


Explain the use of virtual destructor?

1024


How would you use the functions sin(), pow(), sqrt()?

1128


Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].

1398


Explain the use of this pointer?

1113


What do the header files usually contains?

998


Difference between pointer to constant and constant pointer to a constant. Give example.

1062


What is the main purpose of c++?

1008