Question: Write a Prolog predicate expt(M, N, E), where M, N and E are integers, N 0, and E = M N . Test your predicate
Write a Prolog predicate expt(M, N, E), where M, N and E are integers, N 0, and E = M N .
Test your predicate on the following.
expt(10, 0, E) E = 1
expt(3, 4, E) E = 81
expt(-10, 6, E) E = 1000000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
