write a C++ program to accept a number and print maximum and minimum digit in that number
Answers
The program output is shown below.
#include<iostream>
#include<iostream>int arr[10], n, i, max, min;
#include<iostream>int arr[10], n, i, max, min;cout << "Enter the size of the array : ";
#include<iostream>int arr[10], n, i, max, min;cout << "Enter the size of the array : ";cin >> n;
#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 :
#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 : ";
#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++)
#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];
#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];