#include #include using namespace std; //simple approach: //sort the array in ascending order. //the first element would be the smallest and the last element would be the largest int main() { int arr[]={1,2,3,4,5}; int n=sizeof(arr)/sizeof(arr[0]); cout<a is the name of the array and n is the size of array a cout< smallest number "< largest number "<