%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% 1. %%%%%%%%%%%%%% % Read all from an input file until end_of_file ?- real_all_from_file('C:\\Users\\....\\pb.txt',L). % L will contain all the elements read from the input file %%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% 2. %%%%%%%%%%%%%% ?-generate_random_list(5,101,L),write_to_a_file('C:\\Users\\...\\out.txt',L). % write_to_a_file writes each of the elements of a list on a line followed by '.' % e.g. if L=[1,4,5,7,8], then the file out.txt is of the form 1. 4. 5. 7. 8. %%%%%%%%%%%%%%%%%%%%%%%%% %%%%% 3. %%%%%%%%%%%%% ?-read_all_from_file('C:\\Users\\....\\pb.txt',L), quick_sort(L,S), write_to_a_file('C:\\Users\\...\\sorted.txt',L).