fork(1) download
  1. package main
  2. import ("fmt"
  3. "strconv"
  4. "math")
  5.  
  6. func main() {
  7. t := strconv.Itoa(57890)
  8. fmt.Println("Tamanho matematicamente calculado:", math.Floor(math.Log10(math.Abs((57890)))) + 1)
  9. for i := 0; i < len(t); i++ {
  10. fmt.Printf("%c\n", t[i])
  11. }
  12. }
  13.  
  14. //https://pt.stackoverflow.com/q/208028/101
Success #stdin #stdout 0s 2976KB
stdin
Standard input is empty
stdout
Tamanho matematicamente calculado: 5
5
7
8
9
0