scubaopf.blogg.se

Resistor code program
Resistor code program







resistor code program

A space has to be put between every 3 digits. For example, if the resistor value is "500000 -ohms", the format is required to be Displaying the required format of the resistor value.Type the colours in lowercaseĭo you want to decode another resistor (Y/N)? Enter the colours of the resistor’s three bands, beginning 5 Your program MUST also allow the user to repeat this calculation as often she/he wishes without the need to rerun the program > continue in the next pageĬolor Tolerance 1991- +2% 5-band Resistor Color Code Table 1 BAND 2nd BAND 3rd BAND Multiplier (1"digit) (2 digit) (300 digit) 0 0 0 1 1 1 10 2 2 2 10 3 3 3 10 4 4 4 10 5 5 5 6 6 6 10 7 7 7 10 8 8 8 10 9 9 9 100 10 10 BLACK BROWN RED ORANGE YELLOW GREEN BLUE VIOLET GREY WHITE GOLD SILVER BLANK 10 10.50% +0.25% +0.10% 10.05% 15% 10% + 20% IT -Color inputs NOT VALID for resistor, multiplier, or tolerance conversion, The resistor value (R) is calculated as: R = * Multiplier EXAMPLES If a resistor color sequence If a resistor color sequence Green Orange Grey Silver Red Red Orange Blue Yellow Silver is inputted by the user, your program is inputted by the user, your program should should display: display: R=(5x100+3x10+8)x10 - 5.38 R=(2x100+3*10+6)x10º = 236x10° = 2.36x10 Output: Output: Resistor Value=5.38 Ohms +/- 2% Resistor Value-2.I'm trying to develop a C program that calculates the resistor values by inputting the colour bands marked on the resistor.Į.g. Your program MUST also display the resistor values (R) in Ohms, Kilo-Ohms, Mega-Ohms or Giga-Ohms using the following resistor range values: OSR Mega-Ohms R210' => Giga-Ohms 4 Use FUNCTION definition(s) as needed. In these cases, your program MUST allow the user to reenter the inputted color(s) without the need to rerun the program. Your program MUST accept different color input formats such as Blue, blue or BLUE, and 2 MUST also check for possible input errors such as the color was misspelled, or it was not a valid color.

resistor code program

1 The OUTPUTS of your program MUST be the RESISTOR VALUE and TOLERANCE (see examples below). Your program MUST perform the following tasks: Task # Task Description Prompt the user to INPUT a five-color sequence corresponding to the color bands of a resistor (see the 5-band resistor color code Table shown below). Write (also compile and execute) a complete C-program that implement a 5-band resistor color code.









Resistor code program