Saving integer input into a list in (swi-)prolog -
how create list n entries , fill integers user input?
example:
write('how long should list be?'), nl.
- user enters number n
write('enter n integers. press enter after each integer.'), nl.
- user enters n integers
i not quite why need actual i/o (at point).
if possible, try stick using prolog-toplevel. can save lot of trouble / time / effort during development phase of "relational core" of problem want tackle.
Comments
Post a Comment