Advertisement
YavorGrancharov

ConcatenateData2

Dec 17th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class ConcatenateData2 {
  3.     public static void main(String[] args) {
  4.         Scanner console = new Scanner(System.in);
  5.         String firstName = console.nextLine();
  6.         String lastName = console.nextLine();
  7.         int age = Integer.parseInt(console.nextLine());
  8.         String town = console.nextLine();
  9.  
  10.         System.out.printf("You are %s %s, a %s years old person from %s.%n",firstName,lastName,age,town);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement