Skip to content

Instantly share code, notes, and snippets.

@pepet96
Created October 25, 2013 03:48
Show Gist options
  • Save pepet96/7149195 to your computer and use it in GitHub Desktop.
Save pepet96/7149195 to your computer and use it in GitHub Desktop.
Introducir Nombre y Edad
import java.io.*;
public class Age {
public static void main(String [] args) throws IOException {
InputStreamReader inStream = new InputStreamReader(System.in);
BufferedReader systemIn = new BufferedReader(inStream);
String my_name, greeting, myAge, variable;
greeting = "Hello ";
// Your input Name, via terminal
System.out.println("Please introduce you name");
my_name = systemIn.readLine();
// Your input Age
System.out.println("Please introduce your age");
myAge = systemIn.readLine();
// Concatenation
// Output
System.out.println(greeting + my_name + "! \nYour age is: " + myAge);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment