Skip to content

Instantly share code, notes, and snippets.

@vodolaz095
Created March 9, 2016 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vodolaz095/3c2d9648b3f2934b5dd4 to your computer and use it in GitHub Desktop.
Save vodolaz095/3c2d9648b3f2934b5dd4 to your computer and use it in GitHub Desktop.
Some sort of test task
package main
import "fmt"
func main() {
var i int64
for {
i = i + 1
if i >= 200 {
break
}
if i%4 == 0 && i%3 == 0 {
fmt.Println("PingPong")
continue
}
if i%4 == 0 {
fmt.Println("pong")
continue
}
if i%3 == 0 {
fmt.Println("ping")
continue
}
fmt.Printf("%d\n", i)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment