An electrical engineer wishes to calculate the equivalent resistance value for a
ID: 3539754 • Letter: A
Question
An electrical engineer wishes to calculate the equivalent resistance value for an electronic board. The total resistance value depends if the resistors are placed in parallel or series. For resistors in series, the resistance is calculated by adding the values in Ohms (r1+r2+...) of the individual resistors. For resistors in parallel, the resistance is calculated by the following formula: 1 / (1/r1 + 1/r2 + ...).
Write a program that first asks the user if the resistors are placed in series or parallel, then asks the user for the values of resistors in Ohms (we do not know how many resistors - use 0 as sentinel to end entry) and then calculates and prints out the total resistance.
Your program must have two user defined functions: one for the series computations and another for the parallel computations.
. Make sure your program is commented and properly indented.
Explanation / Answer
this is the program in c++ u can change it to c easily just take the steps and what u will change most likely is the cout and cin statements #include using namespace std; void series() { int num=1,sum=0; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.