blob: 2a595b89433843fc77b39bf4ffb16cfcd019c3bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
clear//
//Case a :
//Variables
R = 8.0 //Resistance (in ohm)
P1 = 60.0 //Power (in watt)
//Calculation
I1 = (P1/R)**0.5 //Current (in Ampere)
//Case b :
//Variables
R = 8.0 //Resistance (in ohm)
P2 = 120.0 //Power (in watt)
//Calculation
I2 = (P2/R)**0.5 //Current (in Ampere)
//Result
printf("\n Maximum new current is %0.2f A.\nMaximum new current is %0.2f A.",I1,I2)
|