Write a C++ program that ask the user to Enter 3 characters. If they are...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C++ program that ask the user to Enter 3 characters. • If they are all small letter, the program output the message "all small" and output the sum of their ascii codes. • If the first and the last letters are from the first 10 alphabets, either small letter or capital letter (A-J or a-j), the program output the message "First and last letters from first 10" and output the sum of the first and the last letter ascii codes. • If the second and the last letters are from the last 10 alphabets, either small letter or capital letter (Q-Z or q-z), the program output the message "Second and Last letters from last 10" and output the sum of the second and the last letter ascii codes. • If not any of the previous cases apply, the program should output the message "You have entered in appropriate 3 letters". Sample Input / Output Enter three letters: abc All small The sum of all letter ASCII codes is 294 First and last letters from first 10 The sum of the first and the last letter ascii codes is 196 Write a C++ program that ask the user to Enter 3 characters. • If they are all small letter, the program output the message "all small" and output the sum of their ascii codes. • If the first and the last letters are from the first 10 alphabets, either small letter or capital letter (A-J or a-j), the program output the message "First and last letters from first 10" and output the sum of the first and the last letter ascii codes. • If the second and the last letters are from the last 10 alphabets, either small letter or capital letter (Q-Z or q-z), the program output the message "Second and Last letters from last 10" and output the sum of the second and the last letter ascii codes. • If not any of the previous cases apply, the program should output the message "You have entered in appropriate 3 letters". Sample Input / Output Enter three letters: abc All small The sum of all letter ASCII codes is 294 First and last letters from first 10 The sum of the first and the last letter ascii codes is 196
Expert Answer:
Answer rating: 100% (QA)
Heres a C program that implements the described functionality include incl... View the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
The data below provides weekly sales for the past 12 weeks (weeks 21-32). Week Sales 21 4,000 22 3,655 23 3,958 24 3,983 25 4,538 26 4,120 27 4,692 28 4,421 29 4,859 30 5,030 31 5,540 32 5,670 Use a...
-
The IT manager of Valley Realty, Inc., prepared the balance sheet of the company while the accountant was ill. The balance sheet contains numerous errors. In particular, the IT manager knew that the...
-
Suppose that a savings institution has an average asset duration of 2.5 years and an average liability duration of 3.0 years. If the savings institution holds total assets of $560 million and total...
-
Larson Property Management Company is one of the largest property management companies in California, with more than 1,000 employees. The company provides a full array of commercial management and...
-
A single-tank process has been operating for a long period of time with the inlet how rate q1 equal to 30.4 ft3/min. After the operator increases the flow rate suddenly by 10%, the liquid level in...
-
How is a market structure identified? What type of market structure drives the pharmaceutical market?
-
n+m Let a1, a2,.., ,ak e R", let b1 , b2, ... , bk E R", and let c1, C2, ... , Cz E R" be defined by C; = for each i = 1,2, ... , k. b (a) If a1, a2, ak is linearly independent, and we make no...
-
Is a undecided major still acceptable these days as far as when you finish school? Do jobs accept that type of degree?
-
Given an unsorted array A of integers of any size, n1, and an integer value x, write an algorithm as a pseudo code (not a program!) that would find out the sum of all elements in the array that have...
-
can you revise this? 1. Thank you for bringing up your concerns. I understand that you may feel like your child isn't learning as much as you would like at school. However, it's important to...
-
Analyze the following code: What is the time complexity? int fun(int n) { int count = 0; for (int i = n; i > 0; i /= 2) for (int j=0; j
-
The Blair Reader/ Family and Memory/ "Heritage"/ "Those Winter Sundays" please may know the manning of these words? 1. Antique 2. Nostrils 3. Crops 4. Buzzards 5. Whittles 6. Cracked 7. Blaze 8....
-
What is the net employment income? Canadian income tax Unless "received", amounts listed are paid by the salesperson Salary received 29,300 Commissions received 14,269 Airfares 3,100 Lodging 3,444...
-
When the concentration of a strong acid is not substantially higher than 1.0 10-7 M, the ionization of water must be taken into account in the calculation of the solution's pH. (a) Derive an...
-
Define an exception class called DimensionException to use in the driver program from Programming Project 4 in Chapter 8. Modify that driver program to throw and catch a DimensionException if the...
-
Repeat Exercise 2 in Chapter 7, but use an instance of ArrayList instead of an array. Do not read the number of values, but continue to read values until the user enters a negative value. Exercise 2...
-
Write a static method blur(double[][]picture) that you could use on a part of a picture file to obscure a detail such as a persons face or a license plate number. This method computes the weighted...
-
In Appendix 16A.1, we illustrate the calculation of a standard error for the marginal effect in a probit model of transportation, Example 16.4. In the appendix, the calculation is for the marginal...
-
In Example 16.3, we illustrate the calculation of the likelihood function for the probit model in a small example. a. Calculate the probability that \(y=1\) if \(x=1.5\), given the values of the...
-
In Examples 16.2 and 16.4, we presented the linear probability and probit model estimates using an example of transportation choice. The logit model for the same example is \(P(A U T...
Study smarter with the SolutionInn App