Write a program , Output from 1 reach  n  String representation of numbers .

1. If  n  yes 3 Multiple of , output “Fizz”;

2. If  n  yes 5 Multiple of , output “Buzz”;

3. If  n  At the same time 3 and 5 Multiple of , output “FizzBuzz”.

Examples :
input :15
output :["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz","11","Fizz","13","14","FizzBuzz"]
func fizzBuzz(n int) []string { s := []string{} for i:=1; i<=n ;i++{ if i%3 ==0
&& i % 5 == 0 { s = append(s,"FizzBuzz") }else if i%3 ==0 { s =
append(s,"Fizz") }else if i%5 == 0{ s = append(s,"Buzz") }else { s =
append(s,strconv.Itoa(i)) } } return s }
  Key points of problem solving :int turn string use strconve.Itoa(i) function

Technology
©2019-2020 Toolsou All rights reserved,
AWS Elastic Compute Cloud (Amazon EC2) Study notes ControllerAdvice Common scenes of PTA-MOOC《Python Programming Zhejiang University 》 Puzzle A Chapter 2 programming problems Dart In Isolatejetson Nano debugging CSI Interface camera , Combined use opencv Turn on the camera Knowledge points of preparing for the Blue Bridge Cup find method Force button 496 The next bigger element IBert/Transformer Calculation of model parameters 2020 year Java industry , General analysis of market environment and position Lambda Expression and functional interface