Subscribe to INFO-Mantra and get Daily Email Updates

Enter your email address:

Delivered by FeedBurner

Friday, May 1, 2009

Command Prompt As a Calculator

Hey Folks you can also use your DOS command as a calculator,just follow the below given procedure and you can do all types arithmetic calculations......



There are two methods to do arithmetic calculations in Windows XP. Either open the Microsoft Calculator program (Start -> Run -> calc.exe) or simply open the good old MS-DOS command prompt window (Start -> cmd.exe)


Here's the SET syntax (type set /? )

set /a expression

Here are some examples of the SET command:

C:\>set /a 2+2 will output 4

C:\>set /a 2*(9/2) will output 8

C:\>set /a (2*9)/2 will output 9

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

The DOS calculator SET is more versatile than the Google Search calculator. It supports the Shift operator (>> or <<) and Octal or Hexadecimal to Decimal conversions.

No comments:

Post a Comment