Resistor Code Program
It's the end of the semester and I should be able to understand this, but the logic hasn't come to me at all. I still greatly struggle with knowing what to do. I don't plan on continuing with programming, unless I pick up some books and learn at my own pace. I was wondering if anyone would be willing to help guide me through the steps on how to do this? Obviously not giving me flat out answers, but helping me along the way. Here are the instructions: Using functional decomposition, write a C++ program that will prompt user for the all the color bands of a resistor and then calculate the value of the resistor. The first three bands are digits, the fourth is a power of ten multiplier and the fifth is the tolerance.
The color codes can either be defined as a 2-dimensional array of char OR a 1-dimensional array of string. Note: If you type upper case or mixture of upper cases and lower cases, your program should still work. This is the image associated with the assignment: Here is what I have so far. I know it's a complete mess. I think your on the right track. If you type upper case or mixture of upper cases and lower cases, your program should still work. IMO the easy way to do this is get the value from the user, then convert it all to upper or lower case.
We also have many tutorials and tips covering numerous languages and areas of programming. Computer Science Canada. Resistor Colour Code Calculator. Dec 29, 2009 Free Download Resistor Code Reader 2.33 - The program calculates the resistance in Ohms, tolerance and TCR.
Line 34 void getBandColor could be a problem. How are you going to pass 3 values back to main? I would put your 'cin's' in main and pass that to your functions as lower case. You can combine line 23 & 24.
Think about how you would do it on paper or a flowchart and it should be easier to concept / program. I tossed together a program to do this a little less than a year ago, IIRC. It is not the nicest code but perhaps you can make use of it. I have found it useful (I do electronics for fun).
I don't know if this is required, but while my program follows the rules (at least for the resistors I usually check with it) there is no validation against IEC, so you can compute the supposed resistance of resistors' based on band combinations which don't obey the standard. Which could lead to exciting results like electrical fires.Sometimes it's best to check with a meter;).
Decompile Mq4 File. • Tell us some more • Upload in Progress • Upload failed. Please upload a file larger than 100x100 pixels • We are experiencing some problems, please try again. Valera - Responsive Html Template. • You can only upload files of type PNG, JPG, or JPEG.
• You can only upload files of type 3GP, 3GPP, MP4, MOV, AVI, MPG, MPEG, or RM. Baccano Ds Game English here. • You can only upload photos smaller than 5 MB. • You can only upload videos smaller than 600MB. • You can only upload a photo (png, jpg, jpeg) or a video (3gp, 3gpp, mp4, mov, avi, mpg, mpeg, rm). • You can only upload a photo or a video. • Video should be smaller than 600mb/5 minutes • Photo should be smaller than 5mb •.