I want to add any lines entered by the user to the list
run :- write('How many students you have: '),read(x),nl.
enterNameOfStudents(x).
enterNameOfStudents(x) :- for(A, 1, x, 1),write('Please enter the names of students'),read(A),??????,nl,fail.
What do I put in ?????? to ensure that everything the user enters is included in the user list, which will be used for further processing later? Please help. I have tried many things like append and stuff, but this does not work :(
source
share