Skip to main content

Featured

WIN ALL ACTEVETED LIFETIME

  Search for: Recent Posts Simple trick to install Windows 11 on an old PC Easy ways to activate Windows 11 for FREE without a product key Remove “You may be a victim of software counterfeiting” notification Windows Defender detects my scripts as “HackTool:BAT/AutoKMS” Quickly convert Windows Server Evaluation edition to the retail one Easiest way to remove the Windows watermark from your screen Categories Computer Tips Microsoft Software Products 2 ways to activate Windows 10 for FREE without additional software Posted by  Always Smile   in  Microsoft Software Products  /  Last updated on  August 26, 2021 As you know, Microsoft notified Windows 10 is “the last version of Windows” and explained that they will be focused on the development of powerful and new features under the guise of software updates instead of building a new version. This means there will be no Windows 11 or 12 in the future(*). So if you are thinking about an upgrade, this is the b...

softwere2

 

Step 1:  Open Notepad

Make Calculator using Command Prompt in windows

Type in the Windows search bar “Notepad” then you’ll get the Notepad in the list of programs.

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!


Copy this CMD Calculator code and paste it in a text file with .bat extension. If you don’t know how to create a new file in windows, let me help you.

  1. Go to Windows Desktop Screen
  2. Right Click >> New
  3. Select the Text File
  4. Paste the code
  5. Give File a name and save as .bat Extension

Step 3:  Save File in Notepad

Make Calculator using Command Prompt in windows

Save Notepad File by clicking on File>>Save As>>Calculator.bat

The .Bat is a File Extension you can’t be changed but you can set any name at the place of Calculator if you want to change the File’s Name.

Step 4: Double Click on the Calculator.bat file and you will get a CMD Window

Make Calculator using Command Prompt in windows

After Creating a File, Double click to open it and file will be open in a Command Window just like the above screenshot.

Then you can select from the numbers to add, subtract, multiply and divide. Enter number and press enter.

Step 5:  Follow Instruction as seen in below Screenshot and your answer will be displayed

Make Calculator using Command Prompt in windows

You have to choose at least two numbers to do the calculations. See in the above screenshot, if you want to add then press 1 and hit enter.

Then, enter two numbers one by one and hit enter. Just like in Screenshot, I am adding 10+10 so firstly I chose 1 for addition.

After that, I entered 10 and hit enter and again 10 and hit enter. That’s how the command prompt calculator roll.

Comments

Popular Posts