01-20-2023, 02:28 PM
Code: (Select All)
_Title "Parallel Reciprocal"
Dim r1, r2, rt As Double
top:
Cls
Print "Enter 0 to find unknown number"
Input "Resistor R1 "; r1
If r1 = 0 Then
Input "r1 can not be 0 "; q
GoTo top
End If
Input "Resistor R2 "; r2
Input "Total r1 parallel to r2 "; rt
If rt = 0 And r2 = 0 Then
Input "Are you an idiot only 1 unknown "; q
GoTo top
End If
If rt = 0 Then
r1 = 1 / r1
r2 = 1 / r2
rt = r1 + r2
End If
If r2 = 0 Then
r1 = 1 / r1
rt = 1 / rt
r2 = rt - r1
End If
Print
Print "for the values of "
Print "R1";: Print 1 / r1
Print "R2";: Print 1 / r2
Print "RT";: Print 1 / rt
Print
Input "0 to end else I will run again"; q
If q = 0 Then System
GoTo top
In electronics to find a value of a Resistor in parallel or a Capacitor in series. The following formula is used (X1 x X2) / (X1 + X2).
To find an unknown value to use would be hard, except when using reciprocals (shortcut for the formula). Must know two values to find the third.
This is so basic, you can use as you please.