Challenge 29

πŸ‘΅πŸ‘ΆπŸ»

Who's Older?

Open in Code Editor or Copy Instructions
...solutions at bottom of page...

Ask the user to input person 1's name and age. Then ask for person 2's name and age. The program should output who is older and by how much

Example outputs:

Jack is 12, while Jill is 2 years younger at 10 years old

Tom and Jerry are both 8 years old

Extension:

Adapt your program so it works for 3 people

Solutions

IGCSE 0478 / O-Level 2210 A-Level 9618