Arduino UNO R3 using two outputs dependent to different inputs

Alto, thanks a lot, highly appreciated your help. Now logic for “ohTank “has started working. Some minor issues are there with input Pin# 6 (ohTanklow) & 7 (ohTankfull), Pin # 5 (storage tank LOW) is perfectly functioning.
• If Pin # 5 is “HIGH” storage tank level not LOW and Pin # 6 high comes, it is starting the “motorup” digital output Pin# 9, which is fine, but after filling the tank Pin # 7 will become high (ohTankfull), that should stop the “motorup” digital output Pin# 9, which is not happening.
• If manually I give Pin # 5 “HIGH” storage tank level not LOW and first simulating Pin # 7 signal “HIGH”, pump not running, with that I give Pin # 6 signal, pump starting even I remove the Pin # 6 signal, it keeps running until I remove the Pin # 7 signal (ohTankfull). That is wrong function.
Our required conditions are as below.
• If Pin # 5 is “HIGH” storage tank level not LOW and Pin # 6 “LOW”, it should start the “motorup” digital output Pin# 9, but during filling first Pin#6 will chage to “HIGH”, that time Pin#9 output should remain on till filling the tank and Pin # 7 become high (ohTankfull), then should stop the “motorup” digital output Pin# 9 [ Pin #5, HIGH + Pin #6 “LOW” + Pin # 7 “LOW” = Output Pin #9 should be “HIGH” (motor running)]
• If Pin # 5 is “HIGH” + Pin # 6 “HIGH” + Pin# 7”LOW” = Output Pin# 9 should be “HIGH” (motor running)
• If Pin # 5 is “HIGH” + Pin # 6 “HIGH” + Pin# 7”HIGH” = Output Pin# 9 should be “LOW” (motor stop)
• In any condition if Pin#5 becomes “LOW”, should stop the output Pin#9 (motor stop)