From 11ad611cf9adb287acc0109c94149d60bd3b1bab Mon Sep 17 00:00:00 2001 From: Mohammad252002 <160382716+Mohammad252002@users.noreply.github.com> Date: Sat, 17 Aug 2024 12:49:51 +0330 Subject: [PATCH] Update 1.11-if-switch.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit کد از لحاظ منطقی مشکل داشت --- content/chapter 1/1.11-if-switch.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/content/chapter 1/1.11-if-switch.md b/content/chapter 1/1.11-if-switch.md index c78e72da5..2ea271b86 100644 --- a/content/chapter 1/1.11-if-switch.md +++ b/content/chapter 1/1.11-if-switch.md @@ -198,20 +198,16 @@ func main() { a := 1 b := 2 c := 3 - if a > b { - if a > c { - fmt.Println("Biggest is a") - } else if b > c { - fmt.Println("Biggest is b") - } else { - fmt.Println("Biggest is c") - } - } else if b > c { + + if a > b && a > c { + fmt.Println("Biggest is a") + } else if b > a && b > c { fmt.Println("Biggest is b") } else { fmt.Println("Biggest is c") } } + ``` ```shell