summaryrefslogtreecommitdiff
path: root/3836/CH13/EX13.7/Ex13_7.sce
blob: da840201b003d434f345072c1b98c6e7840669ec (plain)
1
2
3
4
5
6
7
8
9
10
11
clear
//Initialization
C1=10*10**-6                     //capacitance in Farad
V=100                            //voltage

//Calculation
E=(0.5)*(C1*V**2)              //Energy stored

//Results
printf("\n E = %.1f mJ",E*10**3)