what i need help with determining functions how to word them and
variables to consider
A resistor is a circuit device designed to have a specific resistance
value between its ends. Resistance values are expressed in ohms or
kilo-ohms. Resistors are frequently marked with colored bands that
encode their resistance values. The first two bands from the left are
digits, and the third is a power-of-ten multiplier.
The table below shows the meanings of each band color. For example, if
the first band is green, the second is black, and the third is orange,
the resistor has a value of 50 x 103 ohms or 50 kilo-ohms. The
information in the table can be stored in a C++ program as a constant
array of strings.
const string COLOR_CODES[] = {"black, "brown", "red", "orange",
"yellow",
"green", "blue", "violet", "gray",
"white"};
Notice that "red" is COLOR_CODES[2] and has a digit value of 2 and a
multiplier value of 102. In general, COLOR_CODES[n] has digit value n
and multiplier value 10n.
Write a program that prompts the user for colors of Band 1, Band 2 and
Band 3, and then displays the resistance in ohms. Include a helper
function search(...) that takes three parameters - the list of color
codes, the size of the list and the key color to search for, and
returns the subscript of the list element that matches the key or
returns -1 if the key is not in the list. This index can then be used
to compute the resistance magnitude
black 0 100
brown 1 101
red 2 102
orange 3 103
yellow 4 104
green 5 105
blue 6 106
violet 7 107
gray 8 108
white 9 109
and i also got a scream shot to see final product but i didn't want to
waste download time with posting it whatever help i can get it would be
appreciated
thanks in advance
ac*****@siue.edu