Advertisement
Guest User

Untitled

a guest
Nov 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. read n
  2. m=0
  3. for((i=0;$i<$n;i++)); do
  4. let m=m+1
  5. let t[i]=m
  6. let d[i]=m*m
  7. done
  8. for item in ${t[*]}
  9. do
  10. printf "%s\n" $item
  11. done
  12. for item in ${t[*]}
  13. do
  14. printf "%s\n" $item
  15. done
  16. for item in ${d[*]}
  17. do
  18. printf "%s\n" $item
  19. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement