/* C++ Programming, Example answer, Exercise 1, Sheet 6  */

/* Author: Rob Miller and William Knottenbelt
   Program last changed: 30th September 2001    */

/* This program tests the functions in "IntegerArray.h" */

#include <iostream>
#include "IntegerArray.h"

using namespace std;

const int TEST_SIZE = 5;
	
/* START OF MAIN PROGRAM */
int main() 
{
	int first_list[TEST_SIZE];
	int second_list[TEST_SIZE];
	
	cout << "INPUT FIRST LIST:\n";
	input_array(first_list, TEST_SIZE);
	cout << "\nINPUT SECOND LIST:\n";
	input_array(second_list, TEST_SIZE);
	
	cout << "\nDISPLAY OF FIRST LIST:\n";
	display_array(first_list, TEST_SIZE);
	cout << "\nDISPLAY OF SECOND LIST:\n";
	display_array(second_list, TEST_SIZE);

	copy_array(first_list, second_list, TEST_SIZE);
	
	cout << "\nAFTER COPYING:\n";
	
	cout << "\nDISPLAY OF FIRST LIST:\n";
	display_array(first_list, TEST_SIZE);
	cout << "\nDISPLAY OF SECOND LIST:\n";
	display_array(second_list, TEST_SIZE);

	cout << "\nTHE STANDARD DEVIATION OF THE FIRST " << TEST_SIZE;
	cout << " ELEMENTS OF THE SECOND LIST IS: ";
	cout << standard_deviation(second_list, TEST_SIZE) << "\n";
		
	return 0;
}
/* END OF MAIN PROGRAM */
