Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions