summaryrefslogtreecommitdiff
path: root/1529/CH2/EX2.11/2_11.sce
diff options
context:
space:
mode:
Diffstat (limited to '1529/CH2/EX2.11/2_11.sce')
-rwxr-xr-x1529/CH2/EX2.11/2_11.sce8
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);