C Program to Find Equivalent Capacitance Of Series Combination Of Capacitive Circuit
Capacitance is the ability of a body to store an electric charge. The SI unit of Capacitance is the farad(F). Capacitors can be mainly connected in 2 ways in a circuit. They are
⦁ Capacitors in Series
⦁ Capacitors in Parallel
When Capacitors are connected in series, the total Capacitance is less than any one of the series Capacitors individual Capacitances. The formula for calculating the series total Capacitance is the same form as for calculating parallel resistances.
Series Capacitances Ctotal = 1/1/C1+1/C2+.......1/C3
--------------------------------------------------------------------------------------------------------------------------
#include<stdio.h>
int main( )
{
float c[10], num, Cs=0;
int i;
clrscr();
printf("Enter the number of Capacitors : ");
scanf("%f", &num);
printf("\n Enter value of each Capacitor : n");
for(i=0; i<num; i++)
{
printf("\n c%d : ",i+1);
scanf("%f", &c[i]);
}
for(i=0; i<num; i++)
{
Cs = Cs + (1.0/ c[i]);
}
Cs = 1.0/Cs;
printf("\n Equivalent Series Combination : %f mFarad", Cs);
return(0);
}
--------------------------------------------------------------------------------------------------------------------------
Output
--------------------------------------------------------------------------------------------------------------------------
Enter the Number Of Capacitors : 3
Enter the Value Of Each Capacitor:
C1 : 1
C2 : 1
C3 : 1
Equivalent Series Capacitance : 0.333333 mFarad
EmoticonEmoticon