CMP-2103-Classpage

Question

Calculate using C++ code the current flowing through the RC circuit. The circuit consists of a battery connected in series to a switch, a resistor and a capacitor. When the switch is closed, the current flowing through the circuit is given by;

where; E is the voltage of the battery in volts. R is the value of the resistor in ohms. C is the value of the capacitor in farads. t is the time in seconds after the switch is closed. e is Euler’s number, which is 2.71828 (rounded to five decimal places).

Deadline

2nd November 2022, 11:59 PM.

Guidelines

Assignment Registration