@neha, i forgot that, anyway here is a better solution, i havea attached the calculator. Have fun
mcode_calc.zip (7.32 KB)