Create your Own Calculator by using Command Prompt in Windows is such a creative thing, Just Follow some simple steps and make your own calculator by using CMD tricks.
Now, you can easily create own calculator without having a single knowledge of coding. It’s such an easy task, you just need to paste the code in notepad.
Calculator Code is already provided in the post, just copy the code and paste in the notepad file and save it. Then follow some simple steps to use the calculator in your command prompt.
It’s an amazing way to create a calculator and there are many cmd tricks available to use the calculator properly, also you can show off in front of your friends that you’ve created a CMD calculator using cmd tricks and coding.
How To Make a Calculator by Using CMD Tricks in Windows
Step 1: Open Notepad
Step 2: Paste Below Code in Notepad
@echo off :start Echo Press 1 for Addition echo Press 2 for Subtraction echo Press 3 for Multiplication echo Press 4 for Division echo Press 5 to Quit set /p type= if %type%==1 goto a if %type%==2 goto b if %type%==3 goto c if %type%==4 goto d if %type%==5 goto e :a echo Addition echo Please choose the 2 numbers you wish to add set /p num1= set /p num2= echo %num1%+%num2%? pause set /a Answer=%num1%+%num2% echo %Answer% pause goto start :b echo Subtraction echo Please choose the 2 numbers you wish to subtract set /p num1= set /p num2= echo %num1%-%num2%? pause set /a Answer=%num1%-%num2% echo %Answer% pause goto start :c echo Multiplication echo Please choose the 2 numbers you wish to multiply set /p num1= set /p num2= echo %num1%*%num2%? pause set /a Answer=%num1%*%num2% echo %Answer% pause goto start :d echo Division echo Please choose the 2 numbers you wish to divide set /p num1= set /p num2= echo %num1%/%num2%? pause set /a Answer=%num1%/%num2% echo %Answer% pause goto start :e echo. Done!
Step 3: Save File in Notepad.
Save Notepad File by clicking on File>> Save As>> Calculator.bat
Step 4: Double Click on the Calculator.bat file and you will get a CMD window.