Saturday 16 November 2013

Notepad hmanga calculator siam dan

@echo off
color 0A
title CALCULATOR VERSION 1.0
:loop
cls
echo Calculator Version 1.0 (2012)
echo ------------------------------------
echo * = MULTIPLY
echo + = ADD
echo - = SUBTRACT
echo / = DIVIDE
echo.
echo After an equation, type 'CLEAR' or 'C' to clear the screen of your equations,
echo type 'KEEP' or 'K' to leave them there, or type 'Exit' or 'E' to leave.
:noclear
echo.
set /p UDefine=
set /a UDefine=%UDefine%
echo.
echo =
echo.
echo %UDefine%
echo.
echo KEEP, CLEAR, OR EXIT?
echo Shortkey: K, C, E (Caps/Small)
set /p clearexitkeep=
if %clearexitkeep%==C goto loop
if %clearexitkeep%==c goto loop
if %clearexitkeep%==K echo. && goto noclear
if %clearexitkeep%==k echo. && goto noclear
if %clearexitkeep%==E (exit)
if %clearexitkeep%==e (exit)
:misspell
echo.
echo -------------------Calculator-----------------------
echo You misspelled your command. Please try again-
echo (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

1 comment: