- 493 名前:デフォルトの名無しさん mailto:sage [2009/07/17(金) 12:46:04 ]
- >>492
% Prolog こういう手続き的なのも可能。 t492 :- get_integer(N), length(L,N), for(1,M,N), get_integer(I), list_nth(M,L,I), M = N, max(L,Max), min(L,Min), write_formatted('全要素 = %t\n最大値 = %t\n最小値 = %t\n',[L,Max,Min]). get_integer(N) :- repeat, get_line(Line), atom_to_term(Line,N,_), integer(N).
|

|