මෙන්න පහල තියෙනවා code එක bat programming වල command විස්තර කලින් පොස්ට් එකක දැම්මා. code එක හොදට බලලා ටිකක් හිතලා අපේ items ටිකකුත් දාලා try කරලා අලුත් දේවල් ටිකක් හොයාගන්නකෝ. මේ code එක notepad වලට දාගෙන save as වලින් calc.bat වගේ ඕන නමකින් .bat format එකෙන් save කරගන්න. bat programmes වලට icon වගේම .exe format එකෙන් save කරගන්න හැටි ඉදිරි පොස්ට් එකකින් දාන්නම්. හොද නරක කියලා comment එකක් දන්න හොදේ.
@echo off
title PMG Calculator
color c
echo.
echo Welcome to The Basic Arithmetic PMG Calculator
echo.
echo Made By Hack koje[PMG]
ping localhost -n 3 >nul
:LOADING
cls
echo.
echo Loading.
ping localhost -n 2 >nul
cls
echo.
echo Loading..
ping localhost -n 2 >nul
cls
echo.
echo Loading...
ping localhost -n 2 >nul
cls
echo.
echo Loading....
ping localhost -n 2 >nul
cls
echo.
echo Loading.....
ping localhost -n 2 >nul
cls
echo.
echo Loading.
ping localhost -n 2 >nul
cls
echo.
echo Loading..
ping localhost -n 2 >nul
cls
echo.
echo Loading...
ping localhost -n 2 >nul
cls
echo.
echo Loading....
ping localhost -n 2 >nul
cls
echo.
echo Loading.....
ping localhost -n 2 >nul
ping localhost -n 2 >nul
color c
:START
cls
echo.
echo What Type of Math would you like to do?
echo.
echo IF Add press + ,IF Subtract press - ,IF Multiply press * ,IF Divide press /.
echo.
echo IF You want to exit type ex
set /p math=
IF '%math%' == '+' GOTO ADD
IF '%math%' == '-' GOTO SUB
IF '%math%' == '*' GOTO MULTIPLY
IF '%math%' == '/' GOTO DIVIDE
IF '%math%' == 'ex' GOTO Exit
IF '%math%' == 'EX' GOTO Exit
Exit
:ADD
Cls
GOTO NUMBERSADD
pause
exit
:SUB
Cls
GOTO NUMBERSSUB
pause
exit
:MULTIPLY
Cls
GOTO NUMBERSMULTIPLY
pause
exit
:DIVIDE
Cls
GOTO NUMBERSDIVIDE
pause
exit
:NUMBERSADD
echo What is the First Number you would like to Add?
set /p number1=
cls
echo What is the Second Number you would like to Add?
set /p number2=
cls
GOTO ADD2
exit
:ADD2
Set /A result = %number1% + %number2%
echo The answer is %result%.
Pause
GOTO START
exit
:NUMBERSSUB
echo What is the First Number you would like to Subtract?
set /p number1=
cls
echo What is the Second Number you would like to Subtract?
set /p number2=
cls
GOTO SUB2
exit
:SUB2
Set /A result = %number1% - %number2%
echo The answer is %result%.
pause
GOTO START
exit
:MULTI
:NUMBERSMULTIPLY
echo What is the First Number you would like to Multiply?
set /p number1=
cls
echo What is the Second Number you would like to Multiply?
set /p number2=
cls
GOTO MULTIPLY2
exit
:MULTIPLY2
Set /A result = %number1% * %number2%
echo The answer is %result%.
pause
GOTO START
exit
:NUMBERSDIVIDE
echo What is the First Number you would like to Divide?
set /p number1=
cls
echo What is the Second Number you would like to Divide?
set /p number2=
cls
GOTO DIVIDE2
exit
:DIVIDE2
Set /A result = %number1% / %number2%
echo The answer is %result%.
pause
GOTO START
exit
No comments:
Post a Comment