Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "math"
- "strconv"
- )
- func main() {
- var input string
- fmt.Scanln(&input)
- var maxNum = -math.MaxInt64
- for i := 0; input != "Stop"; i++ {
- n,_ := strconv.Atoi(input)
- if n > maxNum {
- maxNum = n
- }
- fmt.Scanln(&input)
- }
- fmt.Println(maxNum)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement