Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enabledelayedexpansion
- if "%1" == "/?" echo Hello! Write numbers and operations. For example 2 + 3. & goto :eof
- set x=
- set ans=
- set x=%1
- if "%1"=="" set /p x=write!
- :start
- shift
- set x=%x% %1
- if "%1"=="" (
- set /a ans=!x! 2>nul || set ans=error
- echo !ans!
- endlocal & goto :eof
- )
- goto :start
Advertisement
Add Comment
Please, Sign In to add comment