I get the answer for this right triangle as shown below:
shape:- shape(0, 6).
shape(S, A) :- S < A,
count(0, S),
S1 is S+1,
shape(S1, A).
shape(S, X) :- S >= X.
count(A, B) :- A =< B,
write('*'),
A1 is A+1,
count(A1,B).
count(A, B) :- A > B, nl.
*
**
***
****
*****
******
What should i modify to print the right triangle of this type?
*
**
***
****
*****
******