// sample program ; FunctionTemplate.cc 2004.12.16 T. Kondo #include using namespace std; template T maxt(T x, T y) { if(x>y) return x; else return y; } int main() { cout << "exercise function template maxt" << endl; int a,b; double x, y ; cout << "type-in two integeres" << endl; cin >> a >> b ; cout << "maximum integer = "<< maxt(a,b) << endl; cout << "type-in two doubles" << endl; cin >> x >> y ; cout << "maximum double = "<< maxt(x,y) << endl; return 0; }