Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "strconv"
- "fmt"
- )
- func main(){
- numeroCadena := "10"
- numeroEntero, error := strconv.Atoi(numeroCadena)
- if error != nil {
- fmt.Println("Error al convertir: ", error)
- }
- fmt.Println(numeroEntero + 5) // Imprime 15
- }
Add Comment
Please, Sign In to add comment