Write C++ program that finds the resistor value from its color code and output the answer as a numerical format. Remember to use function(s)! P.S.: Use the character code in shown in Table 1 order to represent each color.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.1: Function And Parameter Declarations
Problem 6E
icon
Related questions
Question
6. Given single-character codes for the colored bands that mark a resistor, compute its
resistance.
The color codes are as follows:
Color Code Character Code
Black
'B'
Brown
'N'
1
bandı
Red
2
| banda
bands
Orange
Yellow
3
4
band4
Green
Blue
6
Violet
Gray
White
7
'V'
'A'
9
"W'
Figure 1: Resistor Color Bands
Table 1: Resistor Color Codes
The resistance (2) value of a resistor can be found using the integer value for each color band as follows:
R = (bandl * 10 + band2) * 10band3
Write C++ program that finds the resistor value from its color code and output the answer as a numerical
format. Remember to use function(s)!
P.S.: Use the character code in shown in Table 1 order to represent each color.
Sample output
Input three color codes: YVO
Resistance is: 47000 Ohms.
Transcribed Image Text:6. Given single-character codes for the colored bands that mark a resistor, compute its resistance. The color codes are as follows: Color Code Character Code Black 'B' Brown 'N' 1 bandı Red 2 | banda bands Orange Yellow 3 4 band4 Green Blue 6 Violet Gray White 7 'V' 'A' 9 "W' Figure 1: Resistor Color Bands Table 1: Resistor Color Codes The resistance (2) value of a resistor can be found using the integer value for each color band as follows: R = (bandl * 10 + band2) * 10band3 Write C++ program that finds the resistor value from its color code and output the answer as a numerical format. Remember to use function(s)! P.S.: Use the character code in shown in Table 1 order to represent each color. Sample output Input three color codes: YVO Resistance is: 47000 Ohms.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage