//============================================================
// assign4.cpp
// X459 Assignment  # 4
// Generate 5 random integers in the range of 1 to 10.
// Then display the smallest.
#include <iostream.h>
#include <stdlib.h>
#include <conio.h>
#include <time.h>

main(){

cout << "X459 Assignment # 4 by SSG. Clifton M. Ducre\n";
int numbers [5];
int rand_min;
//Array of five integer elements
int i;

//seed the random number generator with
//the current time
srand ( (unsigned )time ( NULL ) );


// Fill array with five random numbers
for (i= 0; i <= 4; i++){


// generate random numbers from 1 to 10
numbers [i] = rand () % 10 + 1;
}

cout << '\n' << numbers[i];

{
// end if

cout << "\nThe smallest number is:  " << rand_min << endl;
//end program
cout << "Press any key to end...";
cout.flush();
char ch = getch();

}
}

