Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Concatenate {
- public static void main(String[] agrs) {
- Scanner scan=new Scanner(System.in);
- String firstName=scan.nextLine();
- String secondName=scan.nextLine();
- int age=Integer.parseInt(scan.nextLine());
- String town=scan.nextLine();
- System.out.printf("You are %s %s, a %d-years old person from %s.",firstName,secondName,age,town);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement