Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- square(A, M, N, C) :- N > 1, M >= 1, write(C), N1 is N-1, square(A, M, N1, C).
- square(A, M, 1, C) :- write(C), nl, M1 is M-1, square(A, M1, A, C).
- square(_, 0, _, _).
- square(N, C) :- square(N, N, N, C).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement