Starting from:

$15

program uses a void function to check the item number to determine the color of the item,

Note: The program should use a void function to check the item number to
determine the color of the item, and the color should be given to the calling
function by using a reference variable. Use an array to store the colors and
corresponding characters.Code the program so that it displays the color of the item whos item number is ***** by the user. All item numbers contain exactly five characters. All items are available in four colors:blue,green,red, and white. The third character in the item number indicates the item's color, as follows.
B or b= blue
G or g=green
R or r= Red
W or w=White
For example, if the user enters 12b45, the program should display the word "Blue" on the screen. If the item number does not contain exactly five characters, or if the third character is not one of the characters listed above, the program should display an appropriate message on the screen

More products