The information about a person

Report a typo

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 30

Sample Output 1:

J. Smith, 30 years old

Sample Input 2:

Reece Weber 20

Sample Output 2:

R. Weber, 20 years old
Write a program in Kotlin
fun main() {
// put your code here

}
___

Create a free account to access the full topic