Basic C help. charging battery DC RC circuit in series
given circuit containing a capacitor, switch, resistor and power supply. have to create a c program that allows the person using it to calculate time it takes for capacitor to charge up to 50% 70% and 90% of supply voltage Vs.
User must input values for the resistor R, capacitor C and power supply dc voltage with the final time answer given in seconds.
Vc = Vs(1-e^-1/RC)) formula for calculating voltage across capacitor ( as a function of time) t=0 when switch is closed
any ideas? new to c!