Last active
January 12, 2019 22:25
-
-
Save seemcat/2bfcd16e89c26f6e6b02ee7b38d245ce to your computer and use it in GitHub Desktop.
c0d3 solved in Go
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" | |
) | |
var i int = 1 | |
func solution9(num int) int { | |
if (num + i) % 7 == 0 { | |
return num + i | |
} | |
i = i + 1 | |
return solution9(num) | |
} | |
func main() { | |
fmt.Println(solution9(14)) | |
} |
valtyriel
commented
Jan 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment