Input
Output
#include <iostream> using namespace std; int main() { int a[100] ={4, 2, 1, 5}, size = 4, i, min; cout << "Enter the number of elements in array: "; cout << size << endl; cout << "Enter the integers: "; for (i = 0; i < size; i++) { cout << a[i] << " "; } min = a[0]; for (i = 1; i < size; i++) { if (a[i] < min) { min = a[i]; } } cout << "\nMinimum element in an array is " << min; return 0; }