Question: Get 5 unique names Ask the user for five names. If the user enters the same name twice, give a warning and continue asking. For
Get 5 unique names
Ask the user for five names. If the user enters the same name twice,
give a warning and continue asking. For example:
Enter 5 different names...
Enter name # 1: Bob
Enter name # 2: Carol
Enter name # 3: Ted
Enter name # 4: Bob
You already entered that name!
Enter name # 4: Alice
Enter name # 5: Carol
You already entered that name!
Enter name # 5: Zooey
Here are the names:
Bob
Carol
Ted
Alice
Zooey
using C++ programming
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
