Tuesday, September 12, 2006

Command Line Calculator

Do you know that you have a mini-calculator directly... in the command prompt. It is able to calculate expressions too. The trick is to use the SET command with the switch /a. The result is outputted to the console... See some examples:



CommandResult
SET /A 1+12
SET /A (10+20)*260
SET /A (10+20)*2^4720
SET /A (10+20)*2^4-(10*(2+3)*(2+9-1))220
SET /A 0XFF255
SET /A 0XFF+12267

Enjoy...
(Tested on Windows XP)

1 comment:

Anonymous said...

Only works on integers. :(