From a29c94d264a6e2bf2e966115d0f9c328314956d2 Mon Sep 17 00:00:00 2001 From: Abreu Date: Sat, 11 Sep 2021 20:38:13 -0300 Subject: [PATCH] Removed parenthesis --- 2020/01/balance.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/2020/01/balance.c b/2020/01/balance.c index 3d15bea..71bc1a7 100644 --- a/2020/01/balance.c +++ b/2020/01/balance.c @@ -13,7 +13,7 @@ bool readInput(Barrel * line, Barrel * reservoir) { float f; for (i = 0; i < 4; i++) { - if (!(scanf(" %f", &f)) || f <= 0) + if (!scanf(" %f", &f) || f <= 0) return false; if (i % 2 == 0) { line[i / 2].no = i / 2 + 1; @@ -42,8 +42,7 @@ int loadBarrel (Barrel * reservoir, Barrel b) { if (reservoir->juice - capacity * 0.86 < -EPSILON || reservoir->alcohol - capacity * 0.14 < -EPSILON) - return 0; - + return 0; reservoir->juice -= capacity * 0.86; reservoir->alcohol -= capacity * 0.14; return b.no;