Open Notepad
Copy and Paste below code And save as anyname.bat
@echo off
color b
title Calculater
:calculater
echo plz enter your number
color a
set /p a=Value1:
set /p b=Value2:
set /a c=%a%+%b%
set /a d=%a%-%b%
set /a e=%a%*%b%
set /a f=%a%/%b%
pause
color e
echo "What Do you want?
echo "1:Addition"
echo "2:Substraction"
echo "3:Multiplication"
echo "4:Division
choice /c 1234 /m "What is your option 1 , 2 , 3 or 4"%1
IF ERRORLEVEL ==4 GOTO 4
IF ERRORLEVEL ==3 GOTO 3
IF ERRORLEVEL ==2 GOTO 2
IF ERRORLEVEL ==1 GOTO 1
GOTO END
:1
color b
echo Output: %c%
pause && cls && goto calculater
:2
color 34
echo Output: %d%
pause && cls && goto calculater
:3
color f2
echo Output: %e%
pause && cls && goto calculater
:4
echo Output: %f%
pause && cls && goto calculater
:END
echo plz enter your choice
Copy and Paste below code And save as anyname.bat
@echo off
color b
title Calculater
:calculater
echo plz enter your number
color a
set /p a=Value1:
set /p b=Value2:
set /a c=%a%+%b%
set /a d=%a%-%b%
set /a e=%a%*%b%
set /a f=%a%/%b%
pause
color e
echo "What Do you want?
echo "1:Addition"
echo "2:Substraction"
echo "3:Multiplication"
echo "4:Division
choice /c 1234 /m "What is your option 1 , 2 , 3 or 4"%1
IF ERRORLEVEL ==4 GOTO 4
IF ERRORLEVEL ==3 GOTO 3
IF ERRORLEVEL ==2 GOTO 2
IF ERRORLEVEL ==1 GOTO 1
GOTO END
:1
color b
echo Output: %c%
pause && cls && goto calculater
:2
color 34
echo Output: %d%
pause && cls && goto calculater
:3
color f2
echo Output: %e%
pause && cls && goto calculater
:4
echo Output: %f%
pause && cls && goto calculater
:END
echo plz enter your choice
Comments
Post a Comment