blob: 62f973eabc4f1575b043fb2093e1e7ca1e6ffdad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//Variable declaration
epsilon0=8.85*10**-12;
A=100*10**-4; //area(m**2)
d=1*10**-2; //seperation(m)
V=100; //potential(V)
//Calculation
C=epsilon0*A/d; //capacitance(F)
Q=C*V; //charge on plates(C)
//Result
printf('capacitance is %e F \n',C)
printf('charge on plates is %e C \n',Q)
|