The is a simple program, often used in interviews to identify people who stuggle to code.
The program should print the numbers from 1 to 100, except if the number is divisible by 3 then print ‘fizz’, if the number is divisible by 5 print ‘buzz’ or if the number if divisible by both print ‘fizzbuzz’.
package main import "fmt" func main() { for i := 1; i <= 100; i++ { if i%3 == 0 { // Multiple of 3 fmt.

Source link


Please enter your comment!
Please enter your name here