Practical 3.1 (Group A)

The total equivalent resistance of a series resistive circuit with a total of N resistors is given by:

RT = R1 + R2 + …… + RN

Your task is to write a program to calculate the total equivalent resistance and the current of the circuit.

Your programming will prompt the user to enter the following:

a) Total number of resistors in the circuit. Need to be positive, otherwise ask the user to re-enter until correct.

b) The value of each resistor in kΩ. Need to be positive, otherwise ask the user to re-enter until correct.

c) The value of the DC voltage source of the circuit. Needs to be between 1V and 10V, otherwise ask the user to re-enter.

The program will output the following:

a) The value of equivalent resistance of the circuit.

b) The value of the total current through the circuit.

For this task you will need to submit the following:

a) The complete code on OnlineGDB.

b) The code documentation with the flow chart of the program as the last page of the document.

Scroll to Top