diff options
Diffstat (limited to '3648/CH17/EX17.8/Ex17_8.sce')
-rw-r--r-- | 3648/CH17/EX17.8/Ex17_8.sce | 12 |
1 files changed, 12 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)
|