If I understand correctly, you want to create a program that calculates the value of a resistor from its colored stripes. You need to take the colors of the stripes as input and convert them to their corresponding numerical values. Below is a (poorly written) snippet that should give you somewhere to start. An array of strings contains each of the colors, and each color's position in the array corresponds to its numerical value.
1 2 3 4 5 6 7 8 9 10 11 12
string color[] = {"black", "brown", "red", "orange", "yellow", "green", "blue", "violet", "gray", "white"};
string stripe; // the color of a stripe
int value; // the numerical value corresponding to that color
cin >> stripe;
for(int i = 0; i<10; i++){
if(stripe == color[i]){
value = i;
break;
}
}
Then, you need to use that information to calculate the total resistance, which will be
(10*<first stripe> + <second stripe>)* 10^<third stripe>.