shane howard

shane howard

  • NA
  • 2
  • 569

How do I make a program that tells the oldest one of the names?

Aug 31 2022 7:35 AM
  • Write a program that reads names and ages from the user until an empty line is entered. The name and age are separed by a comma.
  • After reading the program prints the age of the oldest person.
  • You can assume that the user enters at least one person and that one of the users is older than the others.

        Example:  

> sebastian,2 
> lucas,2
> lily,1
> hanna,5
> gabriel,10
>
Age of the oldest: 10

 


Answers (1)