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

Mention the purpose of istream class?

1079


How can I learn c++ easily?

1031


what is the difference between overloading & overriding? give example.

1120


You run a shell on unix system. How would you tell which shell are you running?

1133


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

1138


What is the keyword auto for?

1005


What are the various compound assignment operators in c++?

946


What is a friend function in c++?

1519


Is python written in c or c++?

1117


Describe private, protected and public – the differences and give examples.

1138


What is the basic structure of c++ program?

1049


Discuss the possibilities related to the termination of a program before entering the mainq method?

915


When is the copy constructor called?

1098


What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero

1064


Describe new operator?

1101