diff options
Diffstat (limited to '1529/CH2/EX2.11')
-rwxr-xr-x | 1529/CH2/EX2.11/2_11.sce | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/1529/CH2/EX2.11/2_11.sce b/1529/CH2/EX2.11/2_11.sce new file mode 100755 index 000000000..ad3295782 --- /dev/null +++ b/1529/CH2/EX2.11/2_11.sce @@ -0,0 +1,8 @@ +//Chapter 2, Problem 11
+clc;
+V=240; //voltage
+R=30; //resistance
+I=V/R; //calculating current using Ohms law
+P=I*V; //calculating power
+printf("Current = %d A\n\n\n",I);
+printf("Power = %f kW",P/1000);
|