Wednesday 15 May 2013

Using Calculator Through Command Prompt

We have some different trick to use our Command prompt as a different way for differnt use. One of them is to use command prompt as a calculator. Have you ever imagined that a command prompt can be use to calculate your sum and simple calculation related to Mathematics? The command processor CMD.EXE comes with a mini-calculator that can perform simple Arithmetic on 32-bit signed integers. So it can be use like a calculator to calculate some Arithmetic problems.
To make use of command prompt as a calculator just follow the step listed below:-
Note :- To Start command prompt (Go to Start > Run > Type "cmd" and press enter.

Step 1. C:\>set /a 2+2  for addition
                4
Step 2. C:\>set /a 2*(8/2)  for multiplication and division
                8
Step 3. C:\>set /a (2*9)/2
                9
Step 4. 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.

Using this trick you can use command prompt as a calculator and make your friend impress using these codes to the command prompt.
Enjoy :-)

No comments:

Post a Comment