summaryrefslogtreecommitdiff
path: root/3754/CH3/EX3.5/3_5.sce
blob: 893c62872f58f4f6fa1bd1d4bfb84d8bbb9da61c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clear//

//Variables

I = 0.3    //Current (in Ampere)
W = 9.45   //Heat (in Joules)
t = 5      //Time (in seconds)

//Calculation

Q = I * t
V = W/Q    //Voltage (in Volts)

//Result

printf("\n The voltage across filament is  %0.3f  volts.",V)