Example: Greater of Two Values

The input is two values of the same type. The values can be of type int, char or string. Create a method GetMax(), which returns as a result the greater of the two values.

Sample Input and Output

Input Output Input Output Input Output
int
2
16
16 char
a
z
z string
Ivan
Todor
Todor

results matching ""

    No results matching ""