- 1

How will I compute the largest number among three numbers using C++

23rd Mar 2022, 6:48 AM
Usman Ali
Usman Ali - avatar
1 Resposta
+ 2
Use the built-in max() function if you were allowed to. It accepts two arguments only, so you have to nest the call to compare three numbers. std::cout << max( 3, max( 23, 2022 ) ); // output 2022
23rd Mar 2022, 7:49 AM
Ipang