Resistors or Capacitors In Either a Parallel or Series Circuit

The routine first asks the type of calculation: Capacitors in Parallel, Capacitors in Series, Resistors in Parallel, and Resistors in Series. It then asks for the number of capacitors or resistors in the circuit. Then, the routine asks for the values of each capacitor (μFarads) or resistor (ohms) in the circuit. It then returns the total capacitance or resistance for that circuit.