Instructions to follow
1)First open notepad
2)Type the following code;
@echo off
color fa
cls
:st
echo What would you want to do?
echo Add +
echo Subtract -
echo Multiply *
echo Divide /
set /p input=Enter =
If %input%==+ goto Add
If %input%==Add goto Add
If %input%==Subtract goto Subtract
If %input%==- goto Subtract
If %input%==* goto Multiply
If %input%==Multiply goto Multiply
If %input%==/ goto Divide
If %input%==Divide goto Divide
:da
cls
goto st
:Add
cls
set /p a=Enter first number to add =
set /p b=Enter second number to add =
set /a c=a+b
echo[
echo ------------------------------
echo %a%+%b%=%c%
pause>nul
cls
goto st
:Subtract
cls
set /p a=Enter first number to subtract =
set /p b=Enter second number to subtract =
set /a c=a-b
echo[
echo ------------------------------
echo %a%-%b%=%c%
pause>nul
cls
goto st
:Multiply
cls
set /p a=Enter first number to multiply =
set /p b=Enter second number to multiply =
set /a c=a*b
echo[
echo ------------------------------
echo %a%*%b%=%c%
pause>nul
cls
goto st
:Divide
cls
set /p a=Enter first number to Divide =
set /p b=Enter second number to Divide =
set /a c=a/b
echo[
echo ------------------------------
echo %a%/%b%=%c%
pause>nul
cls
goto st
Download The Following text:
1)First open notepad
2)Type the following code;
@echo off
color fa
cls
:st
echo What would you want to do?
echo Add +
echo Subtract -
echo Multiply *
echo Divide /
set /p input=Enter =
If %input%==+ goto Add
If %input%==Add goto Add
If %input%==Subtract goto Subtract
If %input%==- goto Subtract
If %input%==* goto Multiply
If %input%==Multiply goto Multiply
If %input%==/ goto Divide
If %input%==Divide goto Divide
:da
cls
goto st
:Add
cls
set /p a=Enter first number to add =
set /p b=Enter second number to add =
set /a c=a+b
echo[
echo ------------------------------
echo %a%+%b%=%c%
pause>nul
cls
goto st
:Subtract
cls
set /p a=Enter first number to subtract =
set /p b=Enter second number to subtract =
set /a c=a-b
echo[
echo ------------------------------
echo %a%-%b%=%c%
pause>nul
cls
goto st
:Multiply
cls
set /p a=Enter first number to multiply =
set /p b=Enter second number to multiply =
set /a c=a*b
echo[
echo ------------------------------
echo %a%*%b%=%c%
pause>nul
cls
goto st
:Divide
cls
set /p a=Enter first number to Divide =
set /p b=Enter second number to Divide =
set /a c=a/b
echo[
echo ------------------------------
echo %a%/%b%=%c%
pause>nul
cls
goto st
Download The Following text:
Comments
Post a Comment