Guest User

Untitled

a guest
Dec 17th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. build(0) :- nl.
  2. build(N) :-
  3. N>0,
  4. write("*"),
  5. N2 is N-1,
  6. build(N2).
  7.  
  8. asterisk(0).
  9. asterisk(N) :-
  10. N>0,
  11. build(N),
  12. N2 is N-1,
  13. asterisk(N2),
  14. build(N).
  15.  
  16. *****
  17. ** **
  18. ** *
  19. * *
  20. *
  21. *
  22. * *
  23. ** *
  24. ** **
  25. *****
  26.  
  27. *****
  28. ****
  29. ***
  30. **
  31. *
  32. *
  33. **
  34. ***
  35. ****
  36. *****
Add Comment
Please, Sign In to add comment