5 July 2012

GET CALCULATOR FROM NOTEPAD

SOLUTION:-
In rear cases sometime a user (not administrator) or may b administrator wants to calculate.but unfortunately the calculator won't run.this happens because of virus,corrupt file,available only for administrator and so on.
So how do user calculate without calculator?
The answer and method is really very simple,you need to make a calculator with your own.
  • Just open a notepad file.
  • Copy this code and past it:- 
@echo off
title Calculator
color fc
:top
echo --------------------------------------------------------------
echo Welcome!
echo Type your equations below!
echo ---------
echo Addition: +
echo Subtraction: -
echo Division: /
echo Multiplication: *

echo --------------------------------------------------------------
echo.
set /p sum=
set /a ans=%sum%
echo.
echo = %ans%
echo --------------------------------------------------------------
pause
cls
echo Previous Answer: %ans%
goto top
pause
exit


  • Go to file and save it as "calculator.bat",Note that the file extension should be .bat otherwise it will not work.
  • Then navigate to the file and double-click on it and start calculating.

NOTE:- This notepad calculator will only work in standard mood for addition,subtraction,multiplication,and division. and will not work like scientific calculator.

thank you :)

No comments:

Post a Comment