Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
6
Task/Repeat-a-string/Prolog/repeat-a-string-1.pro
Normal file
6
Task/Repeat-a-string/Prolog/repeat-a-string-1.pro
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
%repeat(Str,Num,Res).
|
||||
repeat(Str,1,Str).
|
||||
repeat(Str,Num,Res):-
|
||||
Num1 is Num-1,
|
||||
repeat(Str,Num1,Res1),
|
||||
string_concat(Str, Res1, Res).
|
||||
Loading…
Add table
Add a link
Reference in a new issue