summaryrefslogtreecommitdiff
path: root/3648/CH17/EX17.8
diff options
context:
space:
mode:
Diffstat (limited to '3648/CH17/EX17.8')
-rw-r--r--3648/CH17/EX17.8/Ex17_8.sce12
-rw-r--r--3648/CH17/EX17.8/Ex17_8.txt3
2 files changed, 15 insertions, 0 deletions
diff --git a/3648/CH17/EX17.8/Ex17_8.sce b/3648/CH17/EX17.8/Ex17_8.sce
new file mode 100644
index 000000000..d311a0572
--- /dev/null
+++ b/3648/CH17/EX17.8/Ex17_8.sce
@@ -0,0 +1,12 @@
+//Example 17_8
+clc();
+clear;
+//To find the current in all wires
+v=9 //Units in V
+r1=18 //Units in Ohms
+i2=-v/r1 //Units in A
+v1=6 //Units in V
+r2=12 //Units in Ohms
+i3=(v+v1)/r2 //Units in A
+i1=i3-i2 //Units in A
+printf("Current in wire 1 is I1=%.2f A\nCurrent in wire 2 is I2=%.2f A\nCurrent in wire 3 is I3=%.2f A\n",i1,i2,i3)
diff --git a/3648/CH17/EX17.8/Ex17_8.txt b/3648/CH17/EX17.8/Ex17_8.txt
new file mode 100644
index 000000000..49d0df810
--- /dev/null
+++ b/3648/CH17/EX17.8/Ex17_8.txt
@@ -0,0 +1,3 @@
+Current in wire 1 is I1=1.75 A
+Current in wire 2 is I2=-0.50 A
+Current in wire 3 is I3=1.25 A \ No newline at end of file