Write prolog procedures. (i) Delete the second occurrence of 5 from a list. (ii) Count the numbers divisible of 7 in a l
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write prolog procedures. (i) Delete the second occurrence of 5 from a list. (ii) Count the numbers divisible of 7 in a l
Write prolog procedures. (i) Delete the second occurrence of 5 from a list. (ii) Count the numbers divisible of 7 in a list. (iii) Clear all repetitions of consecutive elements from a list. (iv) Find the smallest subsequence the sum of the elements of which is at least a given number N. (v) Given sets A and B to define the symmetric difference between A and B. (vi) Double the number of arguments of a given predicate. f(X1,X2,X3) -> f(X1,X1, X2, X2, X3, X3). (vii) Find the shortest branch. (viii) Find the least common multiplier of the elements of a tree.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!