Subscribe to MORPH        RSS Feed
-----

nulCalc - Simple batch calculator

Icon Leave Comment
This is nulCalc - a simple batch calculator coded fully by me!

@echo off
color 0a
:MAIN
cls
title nulCalc
echo.
echo Welcome to nulCalc, a simple batch calculator!
echo.
echo Choose an operation:
echo.
echo [1] Addition
echo [2] Subtraction
echo [3] Multiplication
echo [4] Division
echo.
set /p udefine=
if %udefine%==1 goto ADD
if %udefine%==2 goto SUBTRACT
if %udefine%==3 goto MULTIPLY
if %udefine%==4 goto DIVIDE
pause
exit

:ADD
cls
title nulCalc - Addition
echo.
set /p add1=First number=
set /p add2=Second number=
set /a ans1=%add1%+%add2%
echo %add1% + %add2% = %ans1% 
pause
goto MAIN

:SUBTRACT
cls
title nulCalc - Subtraction 
echo.
set /p subtract1=First number=
set /p subtract2=Second number=
set /a ans2=%subtract1%-%subtract2%
echo %subtract1% - %subtract2% = %ans2%
pause
goto MAIN

:MULTIPLY
cls
title nulCalc - Mutiplication
echo.
set /p multiply1=First number=
set /p multiply2=Second number=
set /a ans3=%multiply1%*%multiply2%
echo %multiply1% x %multiply2% = %ans3%
pause
goto MAIN

:DIVIDE
cls
title nulCalc - Division
echo.
set /p divide1=First number=
set /p divide2=Second number=
set /a ans4=%divide1%/%divide2%
echo %divide1% / %divide2% = %ans4%
pause 
goto MAIN

0 Comments On This Entry

 

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

October 2017

S M T W T F S
1234567
891011121314
1516 17 18192021
22232425262728
293031    

Recent Entries

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)

Categories