// maxvalue.cpp: Demonstartion of the function template
// defined in the header maxvaluehead.cpp
#include <iostream>
#include <string>
using namespace std;

template <class T>
T max(T a, T b) {
 return (a > b ? a : b);
}

int main() {
 
 // definition of variables
 double a =1.0, b = 2.0;
 int c = 3, d = 4;
 char e = 'e', f = 'f';
 string g = "gogo", h = "astopstop";
 
 cout << a << " " << b << endl;
 cout << c << " " << d << endl;
 cout << e << " " << f << endl;
 cout << g << " " << h << endl;

     
 cout << "Now the max values of the pairs in order are: " << endl;
 cout << max<double>(a,b) << endl;
 cout << max(c,d) << endl;
 cout << max(e,f) << endl;
 cout << max(g,h) << endl;
 
 return 0;
}
