Question: I have a code of a program that can run and need to modify some values, please help to modify the code of the program.
I have a code of a program that can run and need to modify some values, please help to modify the code of the program.
here is original question and original code:

original code:
#include
b[0] = -1; b[1] = -1; b[2] = -1; printf("Enter the colors of the resistor's four bands, beginning with the band nearest the end. Type the colors in lowercase letters only, NO CAPS. "); printf("Band 1 => "); scanf(" %s", band1); printf("Band 2 => "); scanf(" %s", band2); printf("Band 3 => "); scanf(" %s", band3); while (getchar() != ' '); printf("Band 4 => "); gets(band4);//scanf(" %s", band4); for (i = 0; i "); //ch = getchar(); scanf(" %c", &ch); //getch(); } while (ch == 'Y');
}
HERE is the modify question:
sample run:
plz just tell me the modify code.
Question 2. (S.5 marks0 A resistor is an electric circuit device component and it has a specific resistance value, where the resistance values are expressed in ohms (2). Resistors are generally marked with four colored bands that encode their resistance values which are shown in the following figure. First digit Second digit Multiplier Tolerance (Band one) (Band two) (Band three) (Band four) The first two bands (Band one and Band two are the first and the second digits. The third band (Band three is a power-of-ten multiplier. The fourth band (Band four indicates the tolerance of the resistor which is the percentage deviation of the desired resistance value, measured at 25C. The table below shows the meanings of each band color. For example, if the first band is green, the second is black, the third is orange and the fourth is red, the resistor has a value of 50x10 with a tolerance of 2%. Color Value as digit Value as multiplier Tolerance (%0 (Bands one and two) (Band three) (Band four) Black 10 Brown Red 10 Orange Yellow 0.5 Green Blue 0.25 Violet 0.1 Grey 10 White 10 Gold Silver 10 No color 20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
