Prolog : Simple question
- by abduls85
I want to add any strings user entered into a 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 the ?????? portion to ensure that whatever the user enter will go into a user-defined list which will be used for further processing later ? Please help. I have tried numerous stuff like append and other but it does not work :(