Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [ $# != 1 ]
- then
- echo Zla liczba paramterow...
- else
- i=1
- sum=0
- while [ $i -le $1 ]
- do
- echo Podaj liczbe $i
- i=`expr $i + 1`
- read liczba
- sum=`expr $sum + \`expr $liczba \* $liczba \``
- done
- echo Suma kwadratow = $sum
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement