Fortune Telling Collection - Comprehensive fortune-telling - How to do addition, subtraction, multiplication and division under DOS

How to do addition, subtraction, multiplication and division under DOS

For easy understanding, like this—

@set /a a=3

@set /a b=2

@set /a c= 1

@set /a d=%a%*%b%-%c%

Echo %d%

Pause & gt null

The direct operation is like this—

@set /a a=3*2- 1

Echo %a%

Pause & gt null

Anyway, I think it is self-evident that the previous @ hidden command is the final result. If you remove the @, you can see the details of each step. In addition, do you want to pause-if it is in the DOS interface?