Write a programm that calculate the summ of numbers (from 1 to n) and use mechanize CUT.

22 views
Skip to first unread message

Bohdan Masliannykov

unread,
Apr 22, 2015, 10:53:31 AM4/22/15
to swi-p...@googlegroups.com
How to write a programm that calculate the summ of even numbers (from 1 to n) using  Cut in Prolog ?

Barbara Knox

unread,
Apr 22, 2015, 8:11:18 PM4/22/15
to Bohdan Masliannykov, swi-p...@googlegroups.com
On 23/04/15 2:53 , Bohdan Masliannykov wrote:
> Write a programm that calculate the summ of numbers (from 1 to n) and
> use mechanize CUT.
> How to write such a programm ? i am a newbie in this programming

This is presumably a homework problem.

And it is a badly worded one -- please give us the exact statement of
the problem. (For one thing, the phrase "use mechanize cut" is nonsense
in the context of Prolog".)

What have you done so far? Have you written and/or studied any simple
Prolog programs? Which ones?

Note that if you know nothing and have done nothing then all we could do
for you is give you the answer, which most of us are not willing to do.
You might hit someone who is willing, but IMO they would not be doing
you any favours regarding your Prolog education.

--
---------------------------
| BBB b \ Barbara at LivingHistory stop co stop uk
| B B aa rrr b |
| BBB a a r bbb | ,008015L080180,022036,029037
| B B a a r b b | ,047045,L014114L4.
| BBB aa a r bbb |
-----------------------------
Reply all
Reply to author
Forward
0 new messages