#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;
int main()
{
	int size; int a = 1; int b = 100;
	srand(time(NULL));
	cout << "N: " << endl;
	cin >> size;
	int* arr = new int[size];
	for (int i = 0; i < size; i++)
	{
	
		arr[i] = a + rand()%(b-a+1);;
		cout << arr[i] << ' ';
	}
	cout << endl;
	int tail = arr[size-1]; int count = 0;
	for (int i = 0; i < size; i++)
	{
		if (arr[i] < tail) count++;
		
	}
	cout << "The last element of the array: " << tail << endl;
	cout << "The number of array elements whose value is less than the value of the last array element: " << count << endl;
	system("Pause");
	return 0;
}
