From 8467b73de60cb0b76bf137ad12d2df818c4fcbe5 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Tue, 7 Jun 2022 20:48:56 +0100 Subject: [PATCH] freat: new Function (buzzinga) --- subjects/buzzinga/README.md | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 subjects/buzzinga/README.md diff --git a/subjects/buzzinga/README.md b/subjects/buzzinga/README.md new file mode 100644 index 00000000..be996246 --- /dev/null +++ b/subjects/buzzinga/README.md @@ -0,0 +1,43 @@ +# buzzinga + +### instruction +- Write a function named `buzZinga()` that takes a number as an argument and prints the following: + - If the number is divisible by 3, print `Buz` followed by ('`\n`') + - If the number is divisible by 5, print `Zinga` followed by ('`\n`') + - If the number is divisible by 3 and 5, print `BuzZinga` followed by ('`\n`') + - If the number is not divisible by 3 or 5, print `*` followed by ('`\n`') +### Expected function +```go +func buzZinga(number int) { + +} +``` +### Usage +```go +package main + +func main() { + n := int32(15) + buzZinga(n) +} +``` +And its output : + +```go +$ go run . | cat -e +*$ +*$ +Buz$ +*$ +Zinga$ +Buz$ +*$ +*$ +Buz$ +Zinga$ +*$ +Buz$ +*$ +*$ +BuzZinga$ +``` \ No newline at end of file