Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- clear
- echo '20 liczb z przedziału <30;60>'
- echo 'NOTA: Generowanie liczb może troche potrwać'
- n=1
- while [ $n -le 20 ]
- do
- x=$(( 30+(`od -An -N2 -i /dev/random` )%(60-30+1) ))
- echo $x
- s=$[s+x]
- n=$[n+1]
- done
- echo "Suma wygenerowanych liczb to: $s"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement