@echo off title Calculator :start cls echo This is a simple calculator. echo Type in add for addition, sub for subtraction. echo mul for multiplication or div for division. set /p answer= if %answer% equ add goto add if %answer% equ sub goto sub if %answer% equ mul goto mul if %answer% equ div goto div if %answer% neq add goto start :add cls set result=ERROR echo Please type in the first number to add. set /p num1= echo Please type in the second number. set /p num2= set /a result=num1+num2 echo = %result% pause goto start :sub cls set result=ERROR echo Please type in the first number to subtract. set /p num1= echo Please type in the second number. set /p num2= set /a result=num1-num2 echo = %result% pause goto start :mul cls set result=ERROR echo Please type in the first number to multiply. set /p num1= echo Please type in the second number. set /p num2= set /a result=num1*num2 echo = %result% pause goto start :div cls set result=ERROR echo Please type in the first number to divide. set /p num1= echo Please type in the second number. set /p num2= set /a result=num1/num2 echo = %result% pause goto start