Write a program that reads a string and an integer and prints a name and age message.
Input will consist of a single line containing a string n and a natural number a where
|n| ≤ 30, i.e.: the string n is no more than 30 characters
0 ≤ a ≤ 180
Your program should produce a single line containing the message:
<n> is <a> years old.
<n> replaced by n and
<a> replaced by a.
John is 23 years old.
Jane is 32 years old.
Input is given on a single line as shown above, e.g.:
that is “John[space]23[enter]”.
If you are having trouble with this exercise,
check this explanation on
how to read two values on a single line
in Python, C and Haskell.
This exercise is easier if you solve hello, hi1 and repeat1 first.
try also: swap1
Copyright © 2020-2022 Rudy Matela
All rights reserved