题解 | #数字颠倒#
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
package main import "fmt" func main(){ var input int; fmt.Scan(&input) if input == 0 { fmt.Print(input) } for input>0 { fmt.Print(input%10) input =input/10 } }
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
package main import "fmt" func main(){ var input int; fmt.Scan(&input) if input == 0 { fmt.Print(input) } for input>0 { fmt.Print(input%10) input =input/10 } }
相关推荐