Created
March 29, 2017 17:15
-
-
Save ranapu/3e50ae5d91768096c55df64ba1b95898 to your computer and use it in GitHub Desktop.
A Very Big Sum in Go
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() { | |
var n, num int | |
var sum int | |
fmt.Scan(&n) | |
for i := 0; i < n; i++ { | |
fmt.Scan(&num) | |
sum += num | |
} | |
fmt.Print(sum) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment