summaryrefslogtreecommitdiff
path: root/3769/CH12/EX12.21/Ex12_21.sce
blob: 8a9cf88256ee54729ad3d59b8f9a250e1f257e91 (plain)
1
2
3
4
5
6
7
8
9
10
clear
//Given
L=2.0                         //H
i=2                              //A

//Calculation
U=0.5*L*i**2

//Result
printf("\n Amount of energy spent during the period is %0.3f  J", U)