diff options
Diffstat (limited to '3754/CH3/EX3.36/3_36.sce')
-rw-r--r-- | 3754/CH3/EX3.36/3_36.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/3754/CH3/EX3.36/3_36.sce b/3754/CH3/EX3.36/3_36.sce new file mode 100644 index 000000000..b2b372b16 --- /dev/null +++ b/3754/CH3/EX3.36/3_36.sce @@ -0,0 +1,17 @@ +clear//
+
+//Variables
+
+V = 6.0 //voltage (in volts)
+C = 2.0 //Capacity of battery (in Ampere-hour)
+P = 1.2 //Power rating (in watt)
+
+//Calculation
+
+R = V**2 / P //Resistance (in ohm)
+I = V/R //Current (in Ampere)
+t = C/I //time (in hour)
+
+//Result
+
+printf("\n Battery will last for %0.3f hours.",t)
|