Programing A Calculator With the use of Notepad (Batch Tut)


For those of my readers who are quite interested by programming stuff, here could also be a touch Batch tutorial to help you program a simple calculator within the .bat format. It won’t take you quite 5 minutes and your first calculator which can perform all basic calculation functions would be live.

How to Make a Simple Calculator in Notepad using .bat format

  • Launch your Notepad from your Windows OS PC.
  • Copy and paste this code below into it
    @ECHO OFF
    TITLE BATCH CALCULATOR BY (YOUR NAME)
    COLOR 0C
    :TOP
    ECHO ————————————–
    ECHO -WELCOME TO BATCH CALCULATOR BY *(YOUR NAME)!-
    ECHO ————————————–
    ECHO ENTER YOUR OPERAND
    ECHO.
    SET /P SUM=
    SET /A ANS=%SUM%
    ECHO.
    ECHO = %ANS%
    ECHO ————————————————————–
    PAUSE
    CLS
    ECHO PREVIOUS ANSWER: %ANS%
    GOTO TOP
    PAUSE
    EXIT
  • Now press CTRL + S to save, in the file name put in Calc.bat
  • In the File type, select All Files then Click on Save.
  • Now Launch the Calc.bat by double clicking on it.

Your Calculator is live, you can make use of it to perform your basic calculation functions.

Related posts

Latest posts

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *