Last active
August 29, 2015 14:01
-
-
Save shockalotti/b7d70aedb4fa74265155 to your computer and use it in GitHub Desktop.
Go Golang - If statement
This file contains hidden or 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<=50; i++ { | |
if i % 2 == 0 { | |
fmt.Println("even") | |
} else if i % 3 == 0 { | |
fmt.Println("odd") | |
} else { | |
fmt.Println("not even nor odd") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment