Advertisement
winone1208

zad 8

May 30th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.15 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. s=15
  4. y=-1
  5. x=0
  6. m=0
  7. while [ $s -ge 0 ] # ...,0.
  8. do
  9.   x=$[2*s]
  10.   m=$[m+x]
  11.   s=$[s+y] # 14,13,...
  12. done
  13.  
  14. echo "Masa ściany wynosi $m"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement