Open a notepad (or any other text editor) file and paste the following code in it:
Code:
@ECHO OFF
color 2a
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.
Save the notepad file with a name say “calc.bat” or "Anynameyouwant.bat" where .bat is extension for batch files. Now click on the batch file icon and there opens your own calculator in command prompt window.
Code:
@ECHO OFF
color 2a
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.
Save the notepad file with a name say “calc.bat” or "Anynameyouwant.bat" where .bat is extension for batch files. Now click on the batch file icon and there opens your own calculator in command prompt window.
No comments:
Post a Comment