Subscribe For Free Updates!

We'll not spam mate! We promise.

Tuesday, December 3, 2013

How To Use Command Prompt as a Calculator

The command processor CMD.EXE comes with a mini-calculator that can perform simple arithmetic on 32-bit signed integers:
C:\>set /a 2+2
4
C:\>set /a 2*(9/2)
8
C:\>set /a (2*9)/2
9

C:\>set /a "31>>2"
7

Note that we had to quote the shift operator since it would otherwise be misinterpreted as a "redirect stdout and append" operator.
For more information, type set /? at the command prompt.

Thank You...

Socializer Widget By Blogger Yard
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

2 comments:

  1. Awesome...Thanks for sharing this..

    ReplyDelete
    Replies
    1. @habyb04, You are welcome and i appreciate you comment...Keep checking for more updates

      Delete