Computer Science, asked by Dhemanshu6030, 1 year ago

How to find largest and smallest number in unsorted array c++

Answers

Answered by Anonymous
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