clear
echo
"n="
read
n
i=1
tong=0
while
[ $i -lt $n ]
do
if [ `expr $i % 2` -ne 0 ]; then
tong=`expr $tong + $i`
fi
i=`expr $i + 1`
done
echo "tong la:
$tong"Tags: Lập trình Shell, lập trình Linux, Ubuntu, Script tính tổng lẻ