B
This commit is contained in:
parent
e5e8880e41
commit
518da4a923
1019 changed files with 15877 additions and 0 deletions
13
Task/Arithmetic-Integer/Batch-File/arithmetic-integer.bat
Normal file
13
Task/Arithmetic-Integer/Batch-File/arithmetic-integer.bat
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
@echo off
|
||||
set /P A=Enter 1st Number :
|
||||
set /P B=Enter 2nd Number :
|
||||
set D=%A% + %B% & call :printC
|
||||
set D=%A% - %B% & call :printC
|
||||
set D=%A% * %B% & call :printC
|
||||
set D=%A% / %B% & call :printC & rem truncates toward 0
|
||||
set D=%A% %% %B% & call :printC & rem matches sign of 1st operand
|
||||
exit /b
|
||||
|
||||
:printC
|
||||
set /A C=%D%
|
||||
echo %D% = %C%
|
||||
Loading…
Add table
Add a link
Reference in a new issue