Monday, 27 May 2013

Shell Script to find average of numbers

echo "Enter Number 1:-"
read n1
echo "Enter Number 2:-"
read n2
echo "Enter Number 3:-"
read n3
avg=$((($n1+$n2+$n3)/3))
echo "Average of Number is "$avg

No comments:

Post a Comment