#/usr/sh read A B C D SUM=`expr $A \* $B \* $C` echo `expr ${SUM} % $D`