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

You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

1103


How does atoi function work?

1112


What do you mean by storage classes?

1520


What does ios :: app do in c++?

983


Do you know what are static and dynamic type checking?

1031


Which bit wise operator is suitable for turning off a particular bit in a number?

1075


What is the cout in c++?

1016


What is doubly linked list in c++?

1037


How is data hiding achieved in c++?

1042


How do I start a c++ project?

1027


What does ctime() do?

1065


What is #include sstream?

1025


What is a responder chain?

1022


What's the "software peter principleā€?

1110


In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....

2388