Introduction: Arthur's Batch Calculator
Welcome to my batch calculator. I made this on my own and did not copy this calculator from other sites. This Instructable will show you how to make a Batch Calculator and you can also download a .exe file for this.
Step 1: The Batch Code
Copy this code into notepad or notepad++ and save as Calculator.bat. The .bat is a must. Then save as "all files" to your desktop.
@ echo off
title Arthur's Batch Calculator
color 1D
echo -------------------------
echo Welcome to my Calculator
echo Made by Arthur
echo -------------------------
color 1A
echo ===== =====
echo ===== =====
echo ===== =====
echo.
echo.
echo == ==
echo == ==
echo == ==
echo ================
echo ================
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
pause
cls
:top
color B4
echo ------------------------
echo List of Calculations
echo ------------------------
echo.
echo +=+
echo -=-
echo /=/
echo *=x
echo.
echo.
echo.
echo Enter Calculation
echo.
echo.
echo.
set /p sum=
set /a ans=%sum%
echo.
echo = %ans%
echo ---------------------------------------------------
pause
cls
echo.
echo.
echo Previous Answer %ans%
echo.
echo.
echo.
echo.
goto :top
pause >nul
Step 2: The Running of This Calculator
When you use this calculator use the # pad it is much easier. This calculator dose not divide decimals sorry. The * = multiplication. The / = division. The - = subtraction and the + = addition. To get the answer press enter
Step 3: The .exe File
Download the .exe file here.
3 Comments
5 years ago on Introduction
I did not make a batch calculator but I did make a Visual Basic Script Calculator.
Code:
dim num1
dim num2
dim equ
num1 = inputbox("Enter First number")
equ = inputbox("enter your variable ie. (/ * - +)")
num2 = inputbox("enter second #")
if equ = "/" then msgbox(num1 / num2)
if equ = "*" then msgbox(num1 * num2)
if equ = "-" then msgbox(num1 - num2)
if equ = "+" then msgbox(num1 -- num2)
7 years ago on Introduction
this one is mine enjoy! :)
@echo off
title vCalculator Omega
goto typeset
:errblockfinal
cls
goto val
:errblockval
color 0C
echo.
echo Please enter a number!
pause
set a=
set b=
if %valtilt%==1 goto display
if %valtilt%==0 cls&goto secondint
:errblock
color 0C
echo Incorrect math type!
pause
:typeset
cls
color 0B
echo ____________________
echo +,-,/, or x ?
echo __________________
echo.
echo (Type one below and press enter)
set functiontype=
set /p functiontype=:
if not defined functiontype goto :errblock
if "%functiontype%"=="exit" exit
if "%functiontype%"=="+" set typedisplay=Addition&goto begin
if "%functiontype%"=="-" set typedisplay=Subtraction&goto begin
if "%functiontype%"=="/" set typedisplay=Division&goto begin
if not "%functiontype%"=="x" goto errblock
if "%functiontype%"=="x" set typedisplay=Multiplication&set functiontype=*
:begin
cls
if "%functiontype%"=="x" set functiontype=*
color 0A
set a=
set b=
set c=Only enter 9 digits per prompt, if missing operand above you did not enter anything. Only use whole numbers!
cls
:display
cls
echo _________________
echo %typedisplay%
echo _________________
echo.
:firstint
color 0A
echo ____________________
echo Enter first integer.
echo _____________________
echo.
set /p a=Integer:
if not defined a set valtilt=1&goto errblockval
if not %a% gtr 0 set valtilt=1&goto errblockval
:secondint
color 0A
echo _____________________
echo Enter second integer.
echo ______________________
echo.
set /p b=Integer:
if not defined b set valtilt=0&goto errblockval
if not %b% gtr 0 set valtilt=0&goto errblockval
cls
set /a c=%a%%functiontype%%b%
if %functiontype%==* set functiontype=x
:val
echo _____________________
echo %a%%functiontype%%b%=%c%
echo ____________________
echo.
color 0E
echo (y/n) or (quit)
set /p functiontilt=Would you like a new math type?
if not defined functiontilt goto errblockfinal
if /i "%functiontilt%"=="y" goto typeset
if /i "%functiontilt%"=="n" goto begin
if not "%functiontilt%"=="quit" goto errblockfinal
if /i "%functiontilt%"=="quit" goto :EOF
7 years ago on Introduction
Or this one:
@echo off
:a
echo Enter Equation
echo.
set /p MATH=Equation:
set /a RESULT=%MATH%
echo %RESULT%
pause
cls
goto a