Skip to content

Instantly share code, notes, and snippets.

@Rudis1261
Last active August 29, 2015 14:19
Show Gist options
  • Save Rudis1261/ee66662c4f17af456c95 to your computer and use it in GitHub Desktop.
Save Rudis1261/ee66662c4f17af456c95 to your computer and use it in GitHub Desktop.
Go Lang Testing Number Divisibilities
package main
import "fmt"
func main() {
for i := 1; i < 100; i++ {
if i %2 == 0 && i %3 == 0 && i %4 == 0 {
fmt.Println(i)
}
}
}
@Rudis1261
Copy link
Author

Testing to see what result set would be divisible by a factor of 2, 3 or 4:
https://play.golang.org/p/7hrbV46E9s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment