C Program to Find equivalent resistance of Parallel combination of resistive circuits
Program : Program To find equivalent resistance of Parallel combination of resistive circuits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include<stdio.h> int main() { int r[10], num, i, Rs = 0; printf("Enter the number of Resistances : "); scanf("%d", &num); printf("\nEnter Value of Each Resistance : n"); for (i = 0; i < num; i++) { printf("\n R%d : ", i + 1); scanf("%d", &r[i]); } for (i = 0; i < num; i++) { Rs = Rs + r[i]; } printf("\nEquivalent Series Resistance : %d Kohm", Rs); return (0); } |
Output :
1 2 3 4 5 6 | Enter the number of Resistances : 3 Enter Value of Each Resistance : R1 : 4 R2 : 2 R3 : 3 Equivalent Parallel Resistance : 0.923077 Kohm |