Skip to content

Instantly share code, notes, and snippets.

@alcidesfp
Created December 20, 2013 21:27
Show Gist options
  • Save alcidesfp/8061824 to your computer and use it in GitHub Desktop.
Save alcidesfp/8061824 to your computer and use it in GitHub Desktop.
//-*- coding:utf-8; -*-
def edad
def nombre
def brin = new BufferedReader(new InputStreamReader(System.in))
def num
print("Hola, ¿Cuál es tu nombre? ")
nombre = new String(brin.readLine())
print("¿En qué año naciste? ")
edad = new Integer(brin.readLine())
num = 2013 - edad.intValue();
println("Hola, $nombre")
println("En el año 2013 tendrás $num años")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment