Skip to content

Instantly share code, notes, and snippets.

@JubbaSmail
Created November 13, 2014 11:16
Show Gist options
  • Select an option

  • Save JubbaSmail/ec9c2982b733e4877920 to your computer and use it in GitHub Desktop.

Select an option

Save JubbaSmail/ec9c2982b733e4877920 to your computer and use it in GitHub Desktop.
@echo off
set /p x=
set /p op=
set /p y=
if "%op%"=="+" (
set /a z=%x%+%y%)
if "%op%"=="-" (
set /a z=%x%-%y%)
if "%op%"=="*" (
set /a z=%x%*%y%)
if "%op%"=="/" (
set /a z=%x%/%y%)
echo The answer is: %z%
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment