From 5c28159a9f691b4d08ae03fcfbbf9bd49d5e88bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gil=20de=20G=C3=B3mez=20P=C3=A9rez?= Date: Wed, 12 Aug 2026 13:49:55 +0300 Subject: [PATCH] Fix: 06 - Conditionals Simplified max_of_three. --- modules/02_control_flow/src/conditionals.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/02_control_flow/src/conditionals.cpp b/modules/02_control_flow/src/conditionals.cpp index 5760f8c..f07060d 100644 --- a/modules/02_control_flow/src/conditionals.cpp +++ b/modules/02_control_flow/src/conditionals.cpp @@ -13,11 +13,10 @@ auto classify_score(const int score) -> Grade { auto max_of_three(const int a, const int b, const int c) -> int { if (a >= b) { if (a >= c) return a; - if (c > a) return c; + return c; } if (b >= c) return b; - if (c > b) return c; - return -1; + return c; } auto sign_of(const int value) -> int {