Write a program that reads the first name, the last name and the age of a person and then prints the information as in the examples below.
To solve this problem, use string templates.
Write a program that reads the first name, the last name and the age of a person and then prints the information as in the examples below.
To solve this problem, use string templates.
Sample Input 1:
John Smith 30Sample Output 1:
J. Smith, 30 years oldSample Input 2:
Reece Weber 20Sample Output 2:
R. Weber, 20 years oldCreate a free account to access the full topic