Advertisement
desislava_topuzakova

Merge

Jan 13th, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Concatenate {
  4. public static void main(String[] agrs) {
  5.  
  6. Scanner scan=new Scanner(System.in);
  7. String firstName=scan.nextLine();
  8. String secondName=scan.nextLine();
  9. int age=Integer.parseInt(scan.nextLine());
  10. String town=scan.nextLine();
  11.  
  12. System.out.printf("You are %s %s, a %d-years old person from %s.",firstName,secondName,age,town);
  13.  
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement