Here is the code, just please don't copy and take it as your own. Thank you!
@echo offtitle Calculatorcolor 0aecho Welcome to The Basic Arithmetic Calculatorecho Made By Martin Miglioping localhost -n 3 >nul:LOADINGclsecho Loading.ping localhost -n 2 >nulclsecho Loading..ping localhost -n 2 >nulclsecho Loading...ping localhost -n 2 >nulclsecho Loading....ping localhost -n 2 >nulclsecho Loading.....ping localhost -n 2 >nulping localhost -n 2 >nulcolor 0a:STARTclsecho What Type of Math would you like to do?echo Add, Subtract, Multiply, or Divide.set /p math=IF '%math%' == 'Add' GOTO ADDIF '%math%' == 'add' GOTO ADDIF '%math%' == 'Subtract' GOTO SUBIF '%math%' == 'subtract' GOTO SUBIF '%math%' == 'Multiply' GOTO MULTIPLYIF '%math%' == 'multiply' GOTO MULTIPLYIF '%math%' == 'Divide' GOTO DIVIDEIF '%math%' == 'divide' GOTO DIVIDEExit:ADDClsGOTO NUMBERSADDpauseexit:SUBClsGOTO NUMBERSSUBpauseexit:MULTIPLYClsGOTO NUMBERSMULTIPLYpauseexit:DIVIDEClsGOTO NUMBERSDIVIDEpauseexit:NUMBERSADDecho What is the First Number you would like to Add?set /p number1=clsecho What is the Second Number you would like to Add?set /p number2=clsGOTO ADD2exit:NUMBERSSUBecho What is the First Number you would like to Subtract?set /p number1=clsecho What is the Second Number you would like to Subtract?set /p number2=clsGOTO SUB2exit:NUMBERSMULTIPLYecho What is the First Number you would like to Multiply?set /p number1=clsecho What is the Second Number you would like to Multiply?set /p number2=clsGOTO MULTIPLY2exit:NUMBERSDIVIDEecho What is the First Number you would like to Divide?set /p number1=clsecho What is the Second Number you would like to Divide?set /p number2=clsGOTO DIVIDE2exit:ADD2Set /A result = %number1% + %number2%echo The answer is %result%.PauseGOTO STARTexit:SUB2Set /A result = %number1% - %number2%echo The answer is %result%.pauseGOTO STARTexit:MULTIPLY2Set /A result = %number1% * %number2%echo The answer is %result%.pauseGOTO STARTexit:DIVIDE2Set /A result = %number1% / %number2%echo The answer is %result%.pauseGOTO STARTexit
Comments
Post a Comment