summaryrefslogtreecommitdiff
path: root/1991/CH8/EX8.14/14.sce
blob: 4bc025e764db4593b248f80e335943a195f602dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
//input
v=3 //voltage
c1=2.5*10^-6 //capacitance
c2=2.5*10^-6
c3=2.5*10^-6
//calculation
q=v/((1/c1)+(1/c2)+(1/c3))//capacitors in series
q1=c1*v//capacitors in parallel
//output
printf("the pd when capacitors are in series is %3.3e C",q)
printf("\n the pd when capacitors are in parallel is %3.3e C",q1)