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
What is the basic structure of c++ program?
What does override mean in c++?
Is c the same as c++?
What is a multimap c++?
What is wrapper class in c++?
What is the c++ programming language used for?
What is the full form nasa?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
What are the 2 main types of data structures?
What is encapsulation in C++? Give an example.
What is meant by iomanip in c++?
What is the use of 'using' declaration in c++?
What is difference between c++ and c ++ 14?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
Is it possible to provide default values while overloading a binary operator?