diff options
Diffstat (limited to '3754/CH12/EX12.13/12_13.sce')
-rw-r--r-- | 3754/CH12/EX12.13/12_13.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/3754/CH12/EX12.13/12_13.sce b/3754/CH12/EX12.13/12_13.sce new file mode 100644 index 000000000..39504a76d --- /dev/null +++ b/3754/CH12/EX12.13/12_13.sce @@ -0,0 +1,15 @@ +clear//
+
+//Variables
+
+VS = 6 //Source voltage (in volts)
+VD1=0.7;VD2=0.7;
+R = 1.5 * 10**3 //Resistance (in ohm)
+
+//Calculation
+
+I = (VS - VD1 - VD2)/R //Current (in Ampere)
+
+//Result
+
+printf("\n Total current through the circuit is %0.3f mA." ,I * 10**3)
|