Write c program using cpp file that displays the color of


Write C++ program (using .cpp file) that displays the color of the camera whose item number is entered by the user. All item numbers contain exactly seven characters. All items are available in four colors: black, green, red, and white. The fourth character in the item number indicates the item's color, as follows: a B or b indicates Black, 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, 111r222, 123, and 111k456. Demonstrate your testing in your submission.

Solution Preview :

Prepared by a verified Expert
Business Management: Write c program using cpp file that displays the color of
Reference No:- TGS02935123

Now Priced at $10 (50% Discount)

Recommended (91%)

Rated (4.3/5)