Advertisement
LazySenpai

so cw5

Nov 13th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.12 KB | None | 0 0
  1. x=$1
  2. while [ $x -ne 0 ]; do
  3.     read input
  4.     sum=`expr $sum + \`expr $input \* $input\``
  5.     x=`expr $x - 1`
  6. done
  7. echo $sum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement