Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- if %1=="/?" goto :help
- setlocal
- if %1==""
- goto :readEq
- else do
- goto :main
- :readEq
- echo Type the equation, please
- rem READ
- :main
- set var=""
- :loop
- if ("%1"=="") goto :solve
- set var += %1
- shift
- goto :loop
- :solve
- set /a res = var
- if errorlevel==0
- echo Result = %res%
- else do
- echo Incorrect Equation
- goto :eof
- :help
- echo This is help for you, dunno
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement