resistors quiz

Suppose we have circuits with series and parallel circuit of resistors.  Your team will write one or more functions to calculate equivalent resistance of the circuit.  The routine(s) you did shall support the following main program.

int main() {

float r2, r3, r4, r5;

r2 = parallelResistance( 1, 5);  // 2 resistors in parallel

r3 = parallelResistance( 1, 5, 9);  // 3 resistors in parallel

r4 = parallelResistance( 1, 5, 9, 6);  // 4 resistors in parallel

r5 = serialResistance (8, r2); // see picture, R3 is 8 ohm

//  You need to add code to print out the resistances and make the program work.

}

NOTES: