RosettaCodeData/Task/Arithmetic-Integer/UNIX-Shell/arithmetic-integer-2.sh
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

7 lines
207 B
Bash

#!/bin/sh
read a; read b;
echo "a+b = $((a+b))"
echo "a-b = $((a-b))"
echo "a*b = $((a*b))"
echo "a/b = $((a/b))" # truncates towards 0
echo "a mod b = $((a%b))" # same sign as first operand