I wrote a program for the formula:
(1/Rt)=(1/R1)+(1/R2)+(1/Rn) //I don't have time to use subscripts right now
Here is my current code:
Input "Repeat (n) times:",N //input number of resistors in parallel
1->B //reset the loop variable
Delvar E //clear the current answer
For(B,1,N //repeat depending on how many resistors you have
Input "R:",A //input the resistance in ohms of an individual resistor
A^-1 -> C //I am using the inverse button here
E+C->E //take the total and add the resistance
Delvar ADelvar C //remove any source of error
End //end the for loop
Disp E^-1 //display the correct answer
Disp round(E^-1,2) //display a rounded answer
How can I optimize this code?