How We Can Create Our Own Calculator Using Without any Software
Batch files are text files that contain a sequence of commands commonly used in system command prompt to perform various computer operations like starting programs or running system utilities, etc. In Disk Operating System (DOS) and Windows, batch files are intended to be executed by the command explainer. There are many computer operations that can be performed by using these .bat files. In this article we will know how we can create our own calculator by writing a few commands.
Open notepad file or any other text editor then Copy & Paste the following code into the notepad:
@ECHO OFF
color a
title My Calculator
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
color a
title My Calculator
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
Calculator in command prompt |
You can also convert “.bat” to “.exe” by using “.bat to .exe converter software”. Please follow the link below todownload this software.
0 comments:
Post a Comment