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...

Write a program that read 2o numbers in and array and
output the second largest number. Can anybody help??

Answer Posted / fahad

#include<iostream.h>
void main()
{
int a[20];
int i;
for(i=o ; i<20 ;i++)
cin>>a[i];
}
int(max=a[0];
for(i=1; i<20; i++)
{
if(a[i]>max) max=a[i];
}
cout<<"\n maimun number is ="<< max<<"\n";
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the basic structure of c++ program?

1033


What does override mean in c++?

1013


Is c the same as c++?

954


What is a multimap c++?

1140


What is wrapper class in c++?

1041


What is the c++ programming language used for?

987


What is the full form nasa?

1031


Can the creation of operator** is allowed to perform the to-the-power-of operations?

948


What are the 2 main types of data structures?

1064


What is encapsulation in C++? Give an example.

1026


What is meant by iomanip in c++?

1126


What is the use of 'using' declaration in c++?

1091


What is difference between c++ and c ++ 14?

985


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

1097


Is it possible to provide default values while overloading a binary operator?

1210