Fix: 06 - Conditionals
Simplified max_of_three.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user