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:
| Command | Result |
|---|---|
| SET /A 1+1 | 2 |
| SET /A (10+20)*2 | 60 |
| SET /A (10+20)*2^4 | 720 |
| SET /A (10+20)*2^4-(10*(2+3)*(2+9-1)) | 220 |
| SET /A 0XFF | 255 |
| SET /A 0XFF+12 | 267 |
Enjoy...
(Tested on Windows XP)
1 comment:
Only works on integers. :(
Post a Comment