summaryrefslogtreecommitdiff
path: root/608/CH2/EX2.12
diff options
context:
space:
mode:
Diffstat (limited to '608/CH2/EX2.12')
-rwxr-xr-x608/CH2/EX2.12/2_12.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/608/CH2/EX2.12/2_12.sce b/608/CH2/EX2.12/2_12.sce
new file mode 100755
index 000000000..cdd3a7a43
--- /dev/null
+++ b/608/CH2/EX2.12/2_12.sce
@@ -0,0 +1,15 @@
+//Problem 2.12: The current/voltage relationship for two resistors A and B is as shown in Figure 2.5. Determine the value of the resistance of each resistor.
+
+//initializing the variables:
+I1 = 0.020; // in ampere
+V1 = 20; // in Volts
+I2 = 0.005; // in ampere
+V2 = 16; // in Volts
+
+//calculation:
+R1 = V1/I1
+R2 = V2/I2
+
+printf("\n\nResult\n\n")
+printf("\nResistance(R1): %.0f Ohms",R1)
+printf("\nResistance(R2): %.0f Ohms\n",R2) \ No newline at end of file