How to do simple math using DOS

The following list shows how you can use DOS to do basic arithmetic, for example sum, subtraction etc.

You can use these with other variables, for example if I hate a variables called %number% which was 11, I can use the following command to make it 10

DOS-Math1

Addition

SET /A Result = 12 + 4

Subtraction

SET /A Result = 23 - 7

Multiplication

SET /A Result = 8 * 2

Division

SET /A Result = 33 / 2

Reference: www.robvanderwoude.com/battech_math.php

Was this article helpful?

Related Articles