Arithmetic/Integer: Difference between revisions

m
→‎{{header|UNIX Shell}}: Whoops, didn't actually delete.
m (Semi-automated edit: Deleted "Bash" (redundant with "UNIX Shell"))
m (→‎{{header|UNIX Shell}}: Whoops, didn't actually delete.)
Line 1,623:
 
(Note: spaces inside the ''$((...))'' are optional and not required; the ''$((...))'' expressions can be inside the double quotes, but the `...` expressions could also have been enclosed in the double quotes in the previous example).
 
{{works with|Bash}}
<lang bash>read -p "Enter x and y: " x y
 
echo "Sum: $((x+y))"
echo "Difference: $((x-y))"
echo "Product: $((x*y))"
echo "Quotient: $((x/y))" # truncates toward zero
echo "Remainder: $((x%y))" # same sign as first operand</lang>
 
=={{header|Vedit macro language}}==
845

edits