Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. if [ $# != 1 ]
  2. then
  3. echo Zla liczba paramterow...
  4. else
  5. i=1
  6. sum=0
  7. while [ $i -le $1 ]
  8. do
  9. echo Podaj liczbe $i
  10. i=`expr $i + 1`
  11. read liczba
  12. sum=`expr $sum + \`expr $liczba \* $liczba \``
  13. done
  14. echo Suma kwadratow = $sum
  15. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement