computer programming (Program Bug and Problems)
Your fault is this line:
If 100<P<200 Then
Here's what happens:
-The program will decide whether or not 100 is less than the price (P).
-This will return a binary flag, either true (1) or false (0).
-The program then decides whether or not the flag (1 or 0) is less than 200.
-This is always true, so PE is set to 1/10th of P regardless of what P equals.
-If P is greater than 200, PE is set to 1/5th of P.
Replace the line with:
If 100<P and P<200 Then
I hope this helps you in the future!