Browse Source

corrected

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