#include <iostream>
#include <climits>

using namespace std;

int liczba_elemntow, minimalna_wartosc;

int minimum1(int n)
{
	int i, x, minx;
	minx = INT_MAX;
	for(i = 0; i < n; i++)
	{
		cout << "Podaj liczbe " << i+1 << ": ";
		cin >> x;
		if(x<minx)
			minx = x;
	}
	return minx;
}

int minimum2(int n)
{
	int i, x, minx;
	for(i=0; i<n; i++)
	{
		cout << "Podaj liczbe " << i+1 << ": ";
		cin >> x;
		if(i == 0)
			minx = x;
		else
			if(x < minx)
				minx = x;
	}
	return minx;
}

int main()
{
    cout << "Podaj liczbe elementow: ";
    cin >> liczba_elemntow;
    cout << "Podaj elementy" << endl;
    minimalna_wartosc = minimum1(liczba_elemntow);
    cout << "Minimum to " << minimalna_wartosc << endl;
    cout << "Podaj elementy" << endl;
    minimalna_wartosc = minimum2(liczba_elemntow);
    cout << "Minimum to " << minimalna_wartosc << endl;
    return 0;
}
