You are viewing a single comment's thread. Return to all comments →
if [ "N" -gt 500 ]; then echo "N must be between 1 and 500" exit 1 fi
sum=0
for (( i=0; ix" -gt 10000 ]; then echo "Each integer must be between -10000 and 10000" exit 1 fi sum=$((sum + x)) done
Seems like cookies are disabled on this browser, please enable them to open this website
Compute the Average
You are viewing a single comment's thread. Return to all comments →
if [ "N" -gt 500 ]; then echo "N must be between 1 and 500" exit 1 fi
sum=0
for (( i=0; ix" -gt 10000 ]; then echo "Each integer must be between -10000 and 10000" exit 1 fi sum=$((sum + x)) done