Question
Write a program that prompts a user for three characters. The user input may be duplicate. The program must validate the user input and re-prompt
Write a program that prompts a user for three characters. The user input may be duplicate. The program must validate the user input and re-prompt until a valid input is entered. The program compares those three characters and prints the largest and the smallest characters on screen.
Example 1: Input 1: C Input 2: B Input 3: A Output: C is the largest and A is the smallest.
Example 2: Input 1: A Input 2: B Input 3: a Output: a is the largest and A is the smallest.
Example 3: Input 1: S Input 2: 1 Please try again! Input 2: 500 Please try again! Input 2: M Input 3: 3 Please try again! Input 2: C Output: S is the largest and C is the smallest.
write this in C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started