Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

oh hai

Name: vunderdong 2009-06-28 0:14

all i know is basic C++, java, and VB. Looking to take steps into HTML and further.

I have other classes I need to take right now, but I wanna do stuff that will help me program my own games and webpages in the future.

hate to noob up your board, but what do / read / download / practice next.

Name: Anonymous 2009-06-28 7:47

>>18
that's not arbitrary precision. try calculating the factorial of ULONG_MAX + 1.
also, that's not sepples.

and here's a complete program:
#!/usr/bin/env -S pl -qs

product([], 1).
product([H|T], X) :- product(T, Y), X is H * Y.

factorial(N, R) :- numlist(2, N, Ns), product(Ns, R).

prolog :- current_prolog_flag(argv, L), forall((member(A, L), tokenize_atom(A, L2), length(L2,1), member(N, L2), integer(N), N >= 0), (factorial(N, F), format("~d! = ~d\n", [N, F]))).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List