Create a txt file and open it with a text editor (ex: Notepad++)
To download Nodepad++ for free click on the picture

Now copy the code below and past it to your txt file
color 1f
title Calcul programed by GTT
CLS
@echo off & mode con: cols=54 lines=16
cls
:Menu
cls
echo.
echo Enter a math problem
echo.
set/p math=
if %math%==Exit exit
set/a math2=%math%
echo.
echo %math%=%math2%
echo.
pause
goto Menu
Save it as a .bat file and run it

Like you see in the pictures belowe all things worked


You can use the multiplication and division and sustraction too.
In this tutorial I'm gonna show you how it's easy to create a calculator with commandes DOSCreate a txt file and open it with a text editor (ex: Notepad++)
To download Nodepad++ for free click on the picture

Now copy the code below and past it to your txt file
color 1f
title Calcul programed by GTT
CLS
@echo off & mode con: cols=54 lines=16
cls
:Menu
cls
echo.
echo Enter a math problem
echo.
set/p math=
if %math%==Exit exit
set/a math2=%math%
echo.
echo %math%=%math2%
echo.
pause
goto Menu
Save it as a .bat file and run it

Like you see in the pictures belowe all things worked


You can use the multiplication and division and sustraction too.
Aucun commentaire: