Question: In C++ please! Write a program that takes three letters (either capital or lowercase) as input then outputs them in the ascending order based on
In C++ please!
Write a program that takes three letters (either capital or lowercase) as input then outputs them in the ascending order based on their ASCII values. Note that letter 'A' has the smallest ASCII value, followed by 'B', until lowercase 'z'. For example, if the user inputs
a A b
the program will output
A a b
Hint: declare three char variables to accept the user input of three letters, then compare these three letters using operator like how you will compare three numbers to determine their output order. Think of three numbers n1, n2, n3, what could be the possible cases (e.g., n1>n2>n3, n1>n3>n2, n2>n1>n3, )?
Any attempt to hard code answers will result in a 0 for the exercise.

Write a program that takes three letters (either capital or lowercase) as input then outputs them in the ascending order based on their ASCII values. Note that letter 'A' has the smallest ASCII value, followed by 'B', until lowercase 'z'. For example, if the user inputs a Ab the program will output A a b Hint: declare three char variables to accept the user input of three letters, then compare these three letters using operator like how you will compare three numbers to determine their output order. Think of three numbers ni, n2, n3, what could be the possible cases (e.g., n1>n2>n3, n1>n3>n2, n2>nl>n3, ...)? Any attempt to hard code answers will result in a 0 for the exercise
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
