summaryrefslogtreecommitdiff
path: root/608/CH2/EX2.10/2_10.sce
blob: b26bb40ddf28c80281bcd568f2919e00693b6660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//Problem 2.10: An electric kettle has a resistance of 30. What current will flow when it is connected to a 240 V supply? Find also the power rating of the kettle.

//initializing the variables:
V = 240; // in Volts
R = 30; // in ohms

//calculation:
I = V/R
P = V*I

printf("\n\nResult\n\n")
printf("\nCurrent(I): %.0f Ampere(A)",I)
printf("\nPower(P): %.0f Watt(W)\n",P)