C Program to Find equivalent capacitance of parallel combination of capacitive circuit
Program : To find equivalent capacitance of Parallel combination of capacitive circuit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include<stdio.h> int main() { float c[10], num, Cp = 0; int i; clrscr(); printf("Enter the number of Capacitors : "); scanf("%f", &num); printf("\nEnter Value of Each Capacitor : n"); for (i = 0; i < num; i++) { printf("\nC%d : ", i + 1); scanf("%f", &c[i]); } for (i = 0; i < num; i++) { Cp = Cp + c[i]; } printf("\nEquivalent Parallel Capacitance : %f mFarad", Cp); return (0); } |
Output :
1 2 3 4 5 6 | 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 |