Code: Select all
@echo off
SET INPUT=
ECHO Make a choice
SET /P n1=1st number:
set /p sym=symbol(+*/-):
set /p n1=2nd number:
set /a sum=%1n% %sym% %2n%
echo %sum%
pause
any help would be greatly appreciated
regards BatMaster
Moderator: DosItHelp
Code: Select all
@echo off
SET INPUT=
ECHO Make a choice
SET /P n1=1st number:
set /p sym=symbol(+*/-):
set /p n1=2nd number:
set /a sum=%1n% %sym% %2n%
echo %sum%
pause
Code: Select all
@echo off
@setlocal EnableDelayedExpansion
ECHO;Make a choice
ECHO;Enter the first numerical value.
set /p 1n=
ECHO;Enter your operator
ECHO;+ * / -
set /p sym=
ECHO;Enter the second numerical value
set /p 2n=
set /a sum=!1n! %sym% !2n!
ECHO;%sum%
pause
BatMaster wrote:this is the codeCode: Select all
@echo off
SET INPUT=
ECHO Make a choice
SET /P n1=1st number:
set /p sym=symbol(+*/-):
set /p n1=2nd number:
set /a sum=%1n% %sym% %2n%
echo %sum%
pause
any help would be greatly appreciated
regards BatMaster
Code: Select all
@echo off
:start
set /p equ=
set /a ans=%equ%
echo %ans%
pause > nul
cls
goto start
Code: Select all
@echo off
SET INPUT=
ECHO Make a choice
SET /P n1=1st number:
set /p sym=symbol(+*/-):
set /p n2=2nd number:
set /a sum=%n1% %sym% %n2%
echo %sum%
pause