write a function that takes an integer array as an input and
finds the largest number in the array. You can not sort
array or use any API or searching needs?
Answer Posted / pawan
#include<iostream>
using namespace std;
int main()
{
int name[5],big,i;
for(i=0; i<=4; i++) {
cout << "Enter a value" << i << ":";
cin >> name[i];
}
cout << "name contains:";
for(i=0; i<=4; i++) {
cout << name[i]<< "\n";
}
big = name[0];
for(i = 0; i <= 4; i++) {
if(name[i] > big)
big = name[i];
}
cout << "The Bigest Number::" << big << endl;
return 0;
}
| Is This Answer Correct ? | 39 Yes | 0 No |
Post New Answer View All Answers
What is this pointer in oop?
2. Give the different notations for the class.\
What is data binding in oops?
What is difference between inheritance and polymorphism?
What is encapsulation in simple terms?
What is protected in oop?
Is oop better than procedural?
What are two types of polymorphism?
What is encapsulation in ict?
What is abstraction encapsulation?
Why is oop better than procedural?
can we make game by using c
What is destructor give example?
What is encapsulation and abstraction? How are they implemented in C++?
Please send ford technologies placement paper 2 my mail id