Minimum and maximum

Write a procedure

    void min_max(int a, int b, int& mn, int& mx);

to store in @mn@ the minimum of @a@ and @b@, and store in @mx@ the maximum of @a@ and @b@. For instance, if called with @a@ =7=7 and @b@ =3= -3, the values after the call must be @mn@ =3=-3 and @mx@ =7= 7.

Observation

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

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T12:17:31.556Z

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