summaryrefslogtreecommitdiff
path: root/293
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /293
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '293')
-rwxr-xr-x293/CH2/EX2.1.c/eg2_1c.sce27
1 files changed, 14 insertions, 13 deletions
diff --git a/293/CH2/EX2.1.c/eg2_1c.sce b/293/CH2/EX2.1.c/eg2_1c.sce
index 42a65d44e..a0f263d98 100755
--- a/293/CH2/EX2.1.c/eg2_1c.sce
+++ b/293/CH2/EX2.1.c/eg2_1c.sce
@@ -1,14 +1,15 @@
-//c - a
-R1 = 10; // first resistance in ohms
-I = 1; // current source
-V = I*R1; // voltage across R
-disp("c - a)")
-disp(V,"voltage across the resistor (in volts)=")
-disp(I,"current flowing through the resistor (in amps) =")
-
-//c - b
-Vr1 = I*R1; // voltage across R1
-Vr2 = I*R2; //voltage across R2
-disp("c - b)")
-disp(Vr,"voltage across the resistor (in volts)=")
+//c - a
+R1 = 10; // first resistance in ohms
+ R2 = 5;
+I = 1; // current source
+V = I*R1; // voltage across R
+disp("c - a)")
+disp(V,"voltage across the resistor (in volts)=")
+disp(I,"current flowing through the resistor (in amps) =")
+
+//c - b
+Vr1 = I*R1; // voltage across R1
+Vr2 = I*R2; //voltage across R2
+disp("c - b)")
+disp(V,"voltage across the resistor (in volts)=")
disp(I,"current flowing through the resistor (in amps) =") \ No newline at end of file