From 9ed2c294e15b046bd4ecd2e2ad24dcf43dc24c9f Mon Sep 17 00:00:00 2001 From: fdai6618 <74294567+fdai6618@users.noreply.github.com> Date: Thu, 2 Feb 2023 22:52:30 +0100 Subject: [PATCH] add refactoring for Methode checkAccount --- src/sendmoney.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/sendmoney.c b/src/sendmoney.c index ba76cae..b9db957 100644 --- a/src/sendmoney.c +++ b/src/sendmoney.c @@ -3,15 +3,6 @@ // hier wird geprüft ob das Kontonummer gultig ist bool checkAccount(int accountNumber) { - - if (accountNumber >= 1000000 && accountNumber <= 9999999) - { - - return true; - } - else - { - - return false; - } + // Refactoring + return (accountNumber >= 1000000 && accountNumber <= 9999999); }