summaryrefslogtreecommitdiff
path: root/3754/CH3/EX3.30/3_30.sce
blob: 959b9e577ec09f2265569fffaea111814373bcb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clear//

//Variables

V = 24.0                      //Voltage (in volts)
I = 2.0                       //Current (in Ampere)
Pb = 0.5                      //Power rating of each light bulb (in watt)

//Calculation

P = V * I                     //Maximum power (in watt)
P80 = P * 0.8                 //80percentageof power rating (in watt) 
n = (P80/Pb)                 //Number of bulbs required 

//Result

printf("\n The number of bulbs required is  %0.3f ." ,n)