Find the maximum and minimum of three or more variables

Правка en1, от L0K11, 2023-03-26 18:45:58

In c++, for 3 variables(a,b,c)-

int mx = max({a,b,c}); int mn = min({a,b,c});

for n variables(a1,a2,a3 ....n)-

int mx = max({a1,a2,a3 ....n}); int mn = min({a1,a2,a3 ....n});

Using this syntex we can easily find the max and min variable.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский L0K11 2023-03-26 18:47:16 4
en1 Английский L0K11 2023-03-26 18:45:58 310 Initial revision (published)