Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #!/bin/bash
  2. clear
  3.  
  4. oposum()
  5. {
  6. RETURN_VALUE=$(expr $1 + $2)
  7. }
  8.  
  9. outp()
  10. {
  11. SUMMA=0
  12. for i in 1 2 3 5 7 11 13 17 19 23; do
  13. printf "$i ";
  14. oposum $SUMMA $i
  15. SUMMA=$RETURN_VALUE
  16. done
  17. printf "\n"
  18. }
  19. echo "Prosti chysla:"
  20. outp
  21. echo "Summa 10 pershych prostych chysel=$SUMMA"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement