C Program to Find equivalent capacitance of parallel 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 parallel, the total capacitance is the sum of the individual Capacitors Capacitances. The formula for calculating the parallel total Capacitance is the same form as for calculating series resistances.
Parallel Capacitances Ctotal = C1+C2+.....Cn
--------------------------------------------------------------------------------------------------------------------------
#include<stdio.h>
int main( )
{
float c[10], num, Cp=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++)
{
Cp = Cp + c[i];
}
printf("\n Equivalent parallel Capacitance : %f mFarad", Cp);
return(0);
}
--------------------------------------------------------------------------------------------------------------------------
Output
--------------------------------------------------------------------------------------------------------------------------
Enter the Number of Capacitors : 3
Enter Value Of Each Capacitor :
C1 : 1.2
C2 : 1.3
C3 : 1.4
Equivalent Parallel Capacitance : 3.900000 mFarad
EmoticonEmoticon