eDragon

Honorable
Feb 8, 2014
2
0
10,510
Hi, I'm trying to get into batch files, and I'm not sure how to simply subtract two numbers. The code is as follows:
echo How old are you?
set /p age=">>"
echo What year is it?
set /p year=">>"
set /a birthyear=%age%-%year%
echo So you were born in %birthyear%?
pause

However, when it shows %birthyear% its like -1985, I wasn't born in -1985! How do I fix this?
 

eDragon

Honorable
Feb 8, 2014
2
0
10,510


Thanks man, just simple math, I'm such a dufus.