Find Equivalent Capacitance of Series Combination of Capacitive Circuit : C Program

Computer Science » C Program » Find Equivalent Capacitance of Series Combination of Capacitive Circuit

Program :

#include<stdio.h>
 
int main() 
{
   float c[10], num, Cs = 0;
   int i;
 
   printf("Enter the number of capacitors : ");
   scanf("%f", &num);
 
   printf("nEnter value of each capacitor : ");
   for (i = 0; i < num; i++) {
      printf("nC%d : ", i + 1);
      scanf("%f", &c[i]);
   }
 
   for (i = 0; i < num; i++) {
      Cs = Cs + (1.0 / c[i]);
   }
   Cs = 1.0 / Cs;
 
   printf("nEquivalent series capacitance : %f", Cs);
   return (0);
}

Output :

Enter the number of capacitors : 3
Enter value of each capacitor : 
C1 : 1
C2 : 1
C3 : 1
Equivalent series capacitance : 0.333333
Subject Name : Computer Science
Exam Name : IIT GATE, UPSC ESE, RRB, SSC, DMRC, NMRC, BSNL, DRDO, ISRO, BARC, NIELIT
Posts Name : Assistant Engineer, Management Trainee, Junior Engineer, Technical Assistant
Computer Science Books

GATE 2023 Total InfoENGG DIPLOMAUGC NET Total Info
IES 2023 Total InfoPSUs 2022 Total InfoCSIR UGC NET Total Info
JAM 2023 Total InfoM TECH 2023 Total InfoRAILWAY 2022 Total Info

Related Posts

  • Find Equivalent Capacitance of Parallel Combination of Capacitive Circuit : C ProgramComputer Science » C Program » Find Equivalent Capacitance of Parallel Combination of Capacitive Circuit Program : [php]#include<stdio.h> int main() { float c[10], num, Cp = 0; int i; printf("Enter the number of capacitors : "); scanf("%f", &num); printf("nEnter value of each capacitor : "); 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", Cp); return (0); }[/php] Output : [php]Enter the number of capacitors : 3 Enter value of each capacitor : C1 : 1 C2 : 5 C3 : 8 Equivalent parallel capacitance : 14.000000[/php]
    Tags: program, find, equivalent, capacitance, combination, capacitive, circuit, computer, science, output
  • Find Equivalent Resistance of Series Combination of Resistive Circuits : C ProgramComputer Science » C Program » Find Equivalent Resistance of Series Combination of Resistive Circuits Program : [php]#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 : "); for (i = 0; i < num; i++) { printf("nR%d : ", i + 1); scanf("%d", &r[i]); } for (i = 0; i < num; i++) { Rs = Rs + r[i]; } printf("nEquivalent series resistance : %d", Rs); return (0); }[/php] Output : [php]Enter the number of resistances : 5 Enter Value of each resistance : R1 : 1 R2 : 2 R3 : 3 R4 : 4 R5 : 5 Equivalent series resistance : 15[/php]
    Tags: program, find, equivalent, series, combination, computer, science, output, programs
  • Find Factorial of a Number : C ProgramComputer Science » C Program » Find Factorial of a Number Program : [php]#include <stdio.h> int main() { int i, fact = 1, num; printf("Enter the number : "); scanf("%d", &num); if (num <= 0) fact = 1; else { for (i = 1; i <= num; i++) { fact = fact * i; } } printf("nFactorial of %d is : %5d", num, fact); }[/php] Output : [php]Enter the number : 5 Factorial of 5 is : 120[/php]
    Tags: program, find, computer, science, output, programs
  • Binary Numbers Pyramid : C ProgramComputer Science » C Program » Binary Numbers Pyramid  Program : [php]#include<stdio.h> int main() { int i, j; int count = 1; for (i = 1; i <= 5; i++) { printf("n"); for (j = 1; j <= i; j++) { printf("%d", count % 2); count++; } if (i % 2 == 0) count = 1; else count = 0; } return(0); }[/php] Output : [php]1 01 101 0101 10101[/php]
    Tags: program, computer, science, output, programs
  • Program to Print All ASCII Value : C ProgramComputer Science » C Program » Program to Print All ASCII Value Program : [php]#include<stdio.h> int main() { int i = 0; char ch; for (i = 0; i < 256; i++) { printf("%c ", ch); ch = ch + 1; }[/php] Output : [php]Å É æ Æ ô ö ò û ù ÿ Ö Ü ¢ £ ¥ ₧ ƒ á í ó ú ñ Ñ ª º ¿ ⌐ ¬ ½ ¼ ¡ « » ░ ▒ ▓ │ ┤ ╡ ╢ ╖ ╕ ╣ ║ ╗ ╝ ╜ ╛ ┐ └ ┴ ┬ ├ ─ ┼ ╞ ╟ ╚ ╔ ╩ ╦ ╠ ═ ╬ ╧ ╨ ╤ ╥ ╙ ╘ ╒ ╓ ╫ ╪ ┘ ┌ █ ▄ ▌ ▐ ▀ α ß Γ π Σ σ µ τ Φ Θ Ω δ ∞ φ ε ∩ ≡ ± ≥ ≤ ⌠ ⌡ ÷ ≈ ° ∙ · √ ⁿ ² ■ ☺ ☻ ♥ ♦ ♣ ♠ ♫ ☼ ► ◄ ↕ ‼ ¶ § ▬ ↨ ↑ ↓ ← ∟ ↔ ▲ ▼ ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6…
    Tags: program, computer, science, output, programs

LEAVE A REPLY

Please enter your comment!
Please enter your name here