Browse Source

corrected

fixDevirged
zainabdnaya 2 years ago committed by zainab Dnaya
parent
commit
4e86e826c5
  1. 33
      subjects/buzzinga/README.md

33
subjects/buzzinga/README.md

@ -1,12 +1,14 @@
# buzzinga # buzzinga
### Instructions ### Instructions
Write a function named `BuzZinga()` that takes a number as an argument and prints the following:
Write a function named `BuzZinga()` that takes a number as an argument, then loop over it and prints the following:
If the number is divisible by 3, print Buz followed by a newline. - If the number is negative, print * followed by a newline.
If the number is divisible by 5, print Zinga followed by a newline. - If the number is divisible by 3, print Buz followed by a newline
If the number is divisible by 3 and 5, print BuzZinga followed by a newline. - If the number is divisible by 5, print Zinga followed by a newline
If the number is not divisible by 3 or 5, print * followed by a newline. - If the number is divisible by 3 and 5, print BuzZinga followed by a newline
- If the number is not divisible by 3 or 5, print * followed by a newline.
- if the number is 0, print BuzZinga followed by a newline.
### Expected function ### Expected function
@ -27,7 +29,13 @@ import (
) )
func main() { func main() {
fmt.Println(BuzZinga(15)) BuzZinga(15)
fmt.Println("----------")
BuzZinga(-3)
fmt.Println("----------")
BuzZinga(5)
fmt.Println("----------")
BuzZinga(0)
} }
``` ```
And its output : And its output :
@ -49,5 +57,14 @@ Buz$
*$ *$
*$ *$
BuzZinga$ BuzZinga$
----------
*$
----------
*$
*$
Buz$
*$
Zinga$
----------
BuzZinga$
``` ```
Loading…
Cancel
Save