Write a program that reads in a list of names and ages until the user enters "quit" as a person’s name. When the sentinel (quit) appears as the name, your program should display the name of the oldest person in the list and then terminate. For example, with the list of entries
Tommy
17
Don Hodges
42
Kathy
51
Ken Summers
19
Elsa Turner
35
quit
the program will print
The oldest person is Kathy.
Surabhi_1
0
Newbie Poster
Recommended Answers
Jump to PostDid you try to do this with pseudocode to see what the operations are? The folowing pseudocode should help you with how you need to write the program.
number age = 0, max = 0; string name, oldest while(true) get name if name == "quit" break get …
All 4 Replies
hastings.george.5
0
Newbie Poster
NathanOliver
429
Veteran Poster
Featured Poster
Surabhi_1
0
Newbie Poster
NathanOliver
429
Veteran Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.