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

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

Program :

#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);
}

Output :

Enter the number of capacitors : 3
Enter value of each capacitor : 
C1 : 1
C2 : 5
C3 : 8
Equivalent parallel capacitance : 14.000000
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 Series Combination of Capacitive Circuit : C ProgramComputer Science » C Program » Find Equivalent Capacitance of Series Combination of Capacitive Circuit Program : [php]#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); }[/php] Output : [php]Enter the number of capacitors : 3 Enter value of each capacitor : C1 : 1 C2 : 1 C3 : 1 Equivalent series capacitance : 0.333333[/php]
    Tags: program, find, equivalent, capacitance, combination, capacitive, circuit, computer, science, output
  • Find Equivalent Resistance of Parallel Combination of Resistive Circuits : C ProgramComputer Science » C Program » Find Equivalent Resistance of Parallel Combination of Resistive Circuits Program : [php]#include<stdio.h> int main() { int r, num, i; float eqr = 0, temp; printf("Enter the number of resistances : "); scanf("%d", &num); printf("nEnter value of each resistance : "); scanf("%f", &eqr); for (i = 1; i < num; i++) { scanf("%d",&r); temp=(1/eqr)+((1/(float)r)); eqr=(1/temp); } printf("nEquivalent series resistance : %f", eqr); return (0); }[/php] Output : [php]Enter the number of resistances : 3 Enter value of each resistance : 100 100 50 Equivalent series resistance : 25.000000[/php]
    Tags: program, find, equivalent, parallel, combination, computer, science, output, programs
  • Searching Element in an Array : C ProgramComputer Science » C Program » Searching Element in an Array Program : [php]#include<stdio.h> int main() { int a[30], element, num, i; printf("nEnter no of elements : "); scanf("%d", &num); printf("nEnter the values : "); for (i = 0; i < num; i++) { scanf("%d", &a[i]); } //Read the element to be searched printf("nEnter the element to be searched : "); scanf("%d", &element); //Search starts from the zeroth location i = 0; while (i < num && element != a[i]) { i++; } //If i < num then Match found if (i < num) { printf("nNumber found at the location : %d", i + 1); } else { printf("nNumber not found."); } return (0); }[/php] Output 1: [php]Enter no of elements : 5 Enter the values : 10 20 30 40 50 Enter the element to be searched : 30 Number found at the location : 3[/php] Output 1: [php]Enter no of elements : 5 Enter the values : 10 20 30 40 50 Enter the element to be searched : 60 Number not found.[/php]
    Tags: program, output, computer, science, programs
  • Find greatest in 3 numbers : C ProgramComputer Science » C Program » Find greatest in 3 numbers  Program : [php]#include&lt;stdio.h&gt; int main() { int a, b, c; printf(&quot;nEnter value of a, b &amp; c : &quot;); scanf(&quot;%d %d %d&quot;, &amp;a, &amp;b, &amp;c); if ((a &gt; b) &amp;&amp; (a &gt; c)) printf(&quot;na is greatest&quot;); if ((b &gt; c) &amp;&amp; (b &gt; a)) printf(&quot;nb is greatest&quot;); if ((c &gt; a) &amp;&amp; (c &gt; b)) printf(&quot;nc is greatest&quot;); return(0); }[/php] Output : [php]Enter value for a,b &amp; c : 12 16 20 c is greatest[/php]
    Tags: program, find, computer, science, output, programs
  • 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, combination, computer, science, output, programs

LEAVE A REPLY

Please enter your comment!
Please enter your name here