Maximum of two integer numbers

Write a function that returns the maximum of two given integer numbers
@a@ and @b@.

Interface

+------------:+:------------------------------------------+
| C++         |     int max2(int a, int b);               |
+-------------+-------------------------------------------+
| C           |     int max2(int a, int b);               |
+-------------+-------------------------------------------+
| Java        |     public static int max2(int a, int b); |
+-------------+-------------------------------------------+
| Python      |     max2(a, b)  # returns int             |
+-------------+-------------------------------------------+
| MyPy Python |     max2(a: int, b: int) -> int           |
+-------------+-------------------------------------------+

Observation

You only need to submit the required procedure; your main program will
be ignored.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:29:07.058Z

© Jutge.org, 2006–2026.
https://jutge.org
