Friday 2 September 2011

Basic Calculator In Batch


Basic calculator written in batch. Copy the given text & paste it on Notepad, save it as calc.bat

Code:

@echo off
title Batch Calculator
echo -------------------------http://www.basicsofhacking.com-------------------------
:1
echo Enter the values with operands (E.g. 1+1):
set /p input=
set /a result=%input%
echo Result is: %result%
:2
echo Wanna continue? Press Y for yes Or N for No
set /p "choice=>"
if %choice%==Y goto 1
if %choice%==N goto end
echo Invalid choice
goto 2
:end
exit


You can also download the text fie from here: Batch Calculator

No comments:

Post a Comment