RosettaCodeData/Task/Arithmetic-Integer/UNIX-Shell/arithmetic-integer-2.sh
2023-07-01 13:44:08 -04: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