RosettaCodeData/Task/Arithmetic-Integer/Batch-File/arithmetic-integer.bat
2026-02-01 16:33:20 -08:00

11 lines
322 B
Batchfile

@echo off
echo Batch rounds towards zero and its modulus should match the sign of the first operand.
set /p a=
set /p b=
set /a "sum=a+b, difference=a-b, product=a*b, intmod=a/b, remainder=a%%b"
echo a + b = %sum%
echo a - b = %difference%
echo a * b = %product%
echo a / b = %intmod%
echo a %%(%%^) b = %remainder%
pause