Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var n, currentNum int
- fmt.Scanln(&n)
- var sum = 0
- for i:= 0; sum < n; i++ {
- fmt.Scanln(¤tNum)
- sum += currentNum
- }
- fmt.Println(sum)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement