i Write a predicate with signature predicate exist1(a: array, x:int) that returns true if the array contains exactly one instance of the number r. Otherwise it returns false. For example, if the array...


i Write a predicate with signature<br>predicate exist1(a: array<int>, x:int)<br>that returns true if the array contains exactly one instance of the number r. Otherwise it<br>returns false. For example, if the array is [3,3,1,0,0,0] and r=1 then the predicate should return<br>true. If r=0, r=3 or r=42 then the predicate returns false.<br>

Extracted text: i Write a predicate with signature predicate exist1(a: array, x:int) that returns true if the array contains exactly one instance of the number r. Otherwise it returns false. For example, if the array is [3,3,1,0,0,0] and r=1 then the predicate should return true. If r=0, r=3 or r=42 then the predicate returns false.

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here