We are going to create a small program via notepad which contains basic arithmetic operations which are already predefined in your operating system, you can execute this file in basic windows run menu, and you can also add more options if you are using a high tech computer.
How to Create a Handy Calculator using Notepad
- Open notepad, and copy paste the following code in it.
@ECHO OFF
color c
title Calculator – Techspotz
pause
ECHO ——————————-
ECHO * ~ Multiply
ECHO + ~ Add
ECHO – ~ Subtract
ECHO / ~ Divide
ECHO ——————————-
pause
:loop
echo.
echo ——————————-
SET /p UDefine=
SET /a UDefine=%UDefine%
ECHO =
ECHO %UDefine%
ECHO.
goto loop
- After that save the file as calculator.bat , which instructs your computer that you have created a batch file, now open it.
Customization:
- color c – change the alphabet c with the following alphabet to change the text colour.
- 0 = Black
- 1 = Blue
- 2 = Green
- 3 = Aqua
- 4 = Red
- 5 = Purple
- 6 = Yellow
- 7 = White
- 8 = Gray
- 9 = Blue
- A = Green
- B = Aqua
- C = Red
- D = Purple
- E = Yellow
- F = White
- title Calculator – Techspotz – Replace Calculator – Techspotz with your desired name to rename your calculator.
How to use this Calculator
- First the message will be displayed as Press any key to continue, then press any key again it will appear following by the instructions, press any key again.
- Now directly type your operation, like it you want to add 5 and 6 then type 5+6, if you want to divide 9 and 3 then 9/3.