Computer Science, asked by soheerahmed428, 7 months ago

Write a C++ program to find the largest and smallest element of an array. (Hint: You have to iterate each value of the array to find the largest and smallest value )​

Answers

Answered by shauryashrutiverma
1

Answer:

Then, this program displays the largest element of that array using loops. ... example, you should have the knowledge of the following C++ programming topics: ... < i + 1 << " : "; cin >> arr[i]; } // Loop to store largest number to arr[0] for(i = 1;i < n; ++i) { // Change < to > if you want to find the smallest element if(arr[0] < arr[i]) arr[0] ...

Similar questions