C++ stl how to find the minimum and maximum of an array
Answers
Answered by
0
Answer:
Explanation:
The program output is shown below.
#include<iostream>
int arr[10], n, i, max, min;
cout << "Enter the size of the array : ";
cin >> n;
cout << "Enter the elements of the array : ";
for (i = 0; i < n; i++)
cin >> arr[i];
max = arr[0];
Answered by
0
Answer:
For calculating the largest of all the elements in a given list, we have std::max, but what if we want to find the largest element ...
DonaSharmahidanz:
Hello
Similar questions