Code:
#include <iostream.h>
int main()
{ int a, b;
cout << "Minimum - Maximum";
cout << "\n";
cout << "________________________________________";
cout << "\n";
cout << "\n";
cout << "Geben Sie 2 ganze Zahlen ein:";
cout << "\n";
cout << "1. Zahl:";
cin >> a;
cout << "2. Zahl:";
cin >> b;
cout << "\n" << "\n" << "\n" << "\n";
if (a != b)
{
if (a < b)
{
cout << "Maximum: " << b;
cout << "\n";
cout << "Minimum:" << a;
}
else
{
cout << "Maximum: " << a;
cout << "\n";
cout << "Minimum:" << b;
}
}
else
{
cout << "Beide Zahlen sind identisch!";
}
cout << "\n" << "\n" << "\n" << "\n" << "\n" << "\n";
cout << "Druecken Sie eine beliebige Taste...";
getchar();
return 0;
}
Das ist natürlich nicht die Komplettlösung, es fehlt die 3te Zahl.
(Compiler: Borland C++ 5.5)