Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
template<typename T>
T maxValue(T a, T b) {
return (a > b) ? a : b;
}
int main() {
std::cout << maxValue(10, 20) << std::endl;
std::cout << maxValue(3.5, 2.1) << std::endl;
return 0;
}Coding works best on desktop or with an external keyboard.