Răspuns:
#include <iostream>
using namespace std;
int main()
{
int n, i;
cin >> n;
float m, min, max;
cin >> m;
min=m; max=m;
for (i=2; i<=n; i++) {
cin >> m;
if (m<min) min=m;
if (m>max) max=m;
}
cout << "max=" << max << " min=" << min << endl;
if (min<5) cout << "sunt corigenti";
return 0;
}
Explicație: