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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by shummis

  1. shummis

    Any ideas for this program?

    Thank kahleen very much. You did a great job. I am in a big respect of you. I wrote the third rule, it was very easy after your help. The program solves the problem correctly ;)
  2. shummis

    Any ideas for this program?

    Thank you very much. I have done insert with "-" sign, but have some problems with 'value' predicate. I wrote: value(L, X) :- ((member('+', L)) -> append(L1, ['+' | L2], L), decimal(L1, 0, A), value(L2,B), X is A + B); ((member('-', L)) -> append(L1, ['-' | L2], L), decimal(L1, 0, A)...
  3. shummis

    Any ideas for this program?

    Thank you. % insert(L, R) - inserts any number of plus signs between % elements in L, resulting R insert([], []). insert([H | T], [H, '+' | T1]) :- T \= [], insert(T, T1). insert([H | T], [H | T1]) :- insert(T, T1). % decimal(L, X, N) - if L contains no '+' signs, computes % in N...
  4. shummis

    Any ideas for this program?

    I have looked all the threads in this forum but found nothing what would help me. If I missed one maybe could you give me a link? I still have no ideas.. :( Very grateful for any help.
  5. shummis

    Any ideas for this program?

    Hello, I am quite new to prolog and need to write this program, but have no ideas. I would be very grateful for any help. "Add signs" The list of the digits (1-9) is given. You need to add operation signs (+, -), that expression of the arithmetic would be the given number (digits in a row...

Part and Inventory Search

Back
Top