If necessary, create a new project named Intermediate23 Project and save it in the Cpp8Chap13 folder. Also

Question:

If necessary, create a new project named Intermediate23 Project and save it in the Cpp8\Chap13 folder. Also create a new source file named Intermediate23.cpp. Write a program that displays the color of the item whose item number is entered by the user. All item numbers contain exactly seven characters. All items are available in four colors: blue, green, red, and white. The fourth character in the item number indicates the item’s color, as follows: a B or b indicates Blue, a G or g indicates Green, an R or r indicates Red, and a W or w indicates White. If the item number does not contain exactly seven characters, or if the fourth character is not one of the valid color characters, the program should display an appropriate message. Use a sentinel value to end the program. Save and then run the program. Test the program using the following item numbers: 123B567, 34AG123, 111r222, 111w222, 123, 1234567, and 111k456.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: