Problem

(Program) Write, compile, and run a C++ program that first determines whether an entered...

(Program) Write, compile, and run a C++ program that first determines whether an entered character is a lowercase or an uppercase letter (see Exercise 14). If the letter is lowercase, determine and print its position in the alphabet. For example, if the entered letter is c, the program should print 3 because c is the third letter in the alphabet. (Hint: If the entered character is lowercase, its position can be determined by subtracting 'a' from the letter and adding 1.) Similarly, if the letter is uppercase, determine and print its position in the alphabet. For example, if the entered letter is G, the program should print 7 because G is the seventh letter in the alphabet. (Hint: If the entered character is uppercase, its position can be determined by subtracting 'A' from the letter and adding 1.)

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 4.2