How to find largest and smallest number in unsorted array c++
Answers
Answered by
0
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]
Similar questions
Math,
6 months ago
Political Science,
6 months ago
Science,
1 year ago
Math,
1 year ago
Math,
1 year ago