From 414c9e1f90d361ad6cb89d7f45f62cd9cf95010c Mon Sep 17 00:00:00 2001 From: gokce Date: Fri, 15 Mar 2019 17:43:20 +0300 Subject: [PATCH] calisma02 icin cozum eklendi --- calisma02/ornek2.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 calisma02/ornek2.go diff --git a/calisma02/ornek2.go b/calisma02/ornek2.go new file mode 100644 index 0000000..e81743b --- /dev/null +++ b/calisma02/ornek2.go @@ -0,0 +1,36 @@ +package main + +import "fmt" + +func main() { + var sayi int + fmt.Println("1 ile 7 arasında bir sayı giriniz") + fmt.Scanf("%d", &sayi) + + for sayi != 0 { + switch sayi { + case 1: + fmt.Println("Pazartesi") + case 2: + fmt.Println("Salı") + case 3: + fmt.Println("Çarşamba") + case 4: + fmt.Println("Perşembe") + case 5: + fmt.Println("Cuma") + case 6: + fmt.Println("Cumartesi") + case 7: + fmt.Println("Pazar") + default: + fmt.Println("Geçersiz bir sayı girdiniz") + + } + fmt.Println("1 ile 7 arasında bir sayı giriniz") + fmt.Scanf("%d", &sayi) + + } + +} +