/* 
   Laboratorium Praktyki Programowania  
   Program przykładowy 
*/


/* Należy pozostawić definicję tylko jednej ze stałych : */

/* dla nowszych kompilatorów */
#define ANSI

/* dla starszych kompilatorów */
//#define ARM


#ifdef ANSI
#include <iostream>
#include <cstring>
using namespace std;
#endif

#ifdef ARM
#include <iostream.h>
#include <string.h>
#endif


#define MAXIMUM(A,B) ((A) > (B)) ? (A) : (B)

template <class T>
T maximum(T x, T y)
{
  return (x > y) ? x : y;
};

int main(){
 cout << maximum(3,4) << endl;
 cout << (MAXIMUM(5,4)) << endl;
 int a=7,b=6;
 cout << maximum(a,b) << endl;
 cout << (MAXIMUM(a,b)) << endl;

 cout << "a=" << a << endl;
 cout << maximum(a++,b) << endl;
 cout << "a=" << a << endl;
 cout << (MAXIMUM(a++,b)) << endl;
 cout << "a=" << a << endl;
}

