home *** CD-ROM | disk | FTP | other *** search
- // P⌐íklad: Programování v C++ na FJFI - ÇVUT
- #pragma hdrfile="TCDEF.SYM" // pro urychlení p⌐ekladu
- #include <iostream.h>
- int max(int x1,int x2) {
- if (x1>x2) return x1; else return x2;
- }
-
- int max0(int x1,int x2) {
- return (x1>x2)?x1:x2;
- }
-
- int min(int x1,int x2) {
- if (x1<x2) return x1; else return x2;
- }
-
- int min0(int x1,int x2) {
- return (x1<x2)?x1:x2;
- }
-
-
- int main() {
- cout << "Start programu:" << endl;
- cout << max(5,60) << " " << max(40,20) << endl;
- cout << max0(5,60) << " " << max0(40,20) << endl;
- cout << min(5,60) << " " << min(40,20) << endl;
- cout << min0(5,60) << " " << min0(40,20) << endl;
- cout << "Konec programu:" << endl << endl;
- return 0;
- }