Friday, April 30, 2010

Create your own calculator‼

Posted by Unknown at 4/30/2010 06:58:00 PM ,
Creating your own PC-calculator is easy. Just copy and paste the code below. More instructions at the end of this post.

@echo off
color 4A
title MY CALCULATOR
:loop
cls
echo created by *My Name*
echo _
echo email:*your-address@example.com*
echo web:*www.your-web-site.com*
echo.
echo *My Calculator*
echo -----------------------------------------------
echo * = MULTIPLY
echo + = ADD
echo - = SUBTRACT
echo 2 = SQUARED
echo / = DIVIDE
echo After an equation, type CLEAR to clear the screen of your equations, type KEEP to leave them there, or type EXIT to leave.
:noclear
set /p UDefine=
set /a UDefine=%UDefine%
echo.
echo =
echo.
echo %UDefine%
echo KEEP, CLEAR, OR EXIT?
set /p clearexitkeep=
if %clearexitkeep%==CLEAR goto loop
if %clearexitkeep%==KEEP echo. && goto noclear
if %clearexitkeep%==EXIT (exit)
:misspell
echo.
echo -----------------------------------------------
echo You misspelled your command. Please try again (make sure you are typing in all caps LIKE THIS).
echo Commands:
echo CLEAR Clear all previous equations and continue calculating.
echo KEEP Keep all previous equations and continue calculating.
echo EXIT Leave your calculating session
echo Enter in a command now.
set /p clearexitkeep=
if %clearexitkeep%==CLEAR goto loop
if %clearexitkeep%==EXIT (exit)
if %clearexitkeep%==KEEP goto noclear
goto misspell



*You can modify these texts as your wish. eg. echo web:*www.web.com*-you can change the text between the asterisks. While creating you can exclude the asterisks.

Steps: 1. Open Notepad
2. Copy and paste the code above
3. Save as a file named "anything.bat"

That's it, your calculator‼

Any problem regarding this?
Contact-
nasif.zafar_02@hotmail.com

Back Top

0 comments:

Post a Comment