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 use of c++ programming language in real life?

1056


What are vtable and vptr?

1158


What are the differences between malloc() and calloc()?

1199


Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

1118


How can I disable the "echo" feature?

1183


What is a container class? What are the types of container classes in c++?

1278


Which is better turbo c++ or dev c++?

1085


What is a singleton class c++?

1050


Which is the best c++ software?

1111


What is a stack? How it can be implemented?

1178


What is an iterator?

1203


What is the cout in c++?

1064


Can you please explain the difference between static and dynamic binding of functions?

1043


which operator is used for performing an exponential operation a) > b) ^ c) none

1073


How to tokenize a string in c++?

1075