Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: YFF
  • Order by date
  1. YFF

    prolog noob question.

    sqr(Number) :- power(Number,2,A), write(A). sqr(In,Out) :- power(In,2,Out). power(Base,0,1). power(Base,Exp,Return) :- E is Exp - 1, power(Base,E,R), Return is R * Base. Why is power() not coming out of its recursion? Is my exit predicate somehow wrong? It will display the right...

Part and Inventory Search

Back
Top