Răspuns:
#include <iostream>
using namespace std;
int main() {
int a, b, c, maxim, minim;
cin >> a >> b >> c;
minim = maxim = a;
if ( b < minim )
minim = b;
if ( c < minim )
minim = c;
if ( b > maxim )
maxim = b;
if ( c > maxim )
maxim = c;
cout << "max=" << maxim << ' ' << "min=" << minim;
return 0;
}
Explicație: