summaryrefslogtreecommitdiff
path: root/3809/CH1/EX1.4/EX1_4.sce
blob: ee3d0837d20aee030950870929a00ee714ff70fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Chapter 1, Example 1.4

clc
//Initialisation
r=50                                    //resistance in ohm
i=3                                 //current in ampere



//Calculation
p=i^2*r                                //Power in watts

//Results
printf("Power P = %.1f Watt",p)