From 37ae9677fa9a32777361fc6a8bd1528cfc243357 Mon Sep 17 00:00:00 2001 From: Irma Date: Mon, 4 Sep 2023 12:42:07 +0200 Subject: [PATCH] worsen the file --- SynonymsAPI/Services/BadService.cs | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/SynonymsAPI/Services/BadService.cs b/SynonymsAPI/Services/BadService.cs index c68c883..7da3a77 100644 --- a/SynonymsAPI/Services/BadService.cs +++ b/SynonymsAPI/Services/BadService.cs @@ -485,6 +485,46 @@ public bool Add_Test_123(string word) } } + public decimal Calculate(decimal amount, int type, int years, bool foo1, bool foo2, bool foo3) + { + decimal result = 0; + decimal disc = (years > 5) ? (decimal)5 / 100 : (decimal)years / 100; + if (type == 1) + { + result = amount; + if (type == 1) + { + result = amount; + } + else if (type == 2) + { + result = (amount - (0.1m * amount)) - disc * (amount - (0.1m * amount)); + } + else if (type == 3) + { + result = (0.7m * amount) - disc * (0.7m * amount); + } + else if (type == 4) + { + result = (amount - (0.5m * amount)) - disc * (amount - (0.5m * amount)); + } + return result; + } + else if (type == 2) + { + result = (amount - (0.1m * amount)) - disc * (amount - (0.1m * amount)); + } + else if (type == 3) + { + result = (0.7m * amount) - disc * (0.7m * amount); + } + else if (type == 4) + { + result = (amount - (0.5m * amount)) - disc * (amount - (0.5m * amount)); + } + return result; + } + public decimal Calculate(decimal amount, int type, int years) { decimal result = 0;