Last active
August 29, 2015 14:19
-
-
Save Rudis1261/ee66662c4f17af456c95 to your computer and use it in GitHub Desktop.
Go Lang Testing Number Divisibilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Testing to see what result set would be divisible by a factor of 2, 3 or 4:
https://play.golang.org/p/7hrbV46E9s