I’m really trying to do it but I still don’t understand it
Solved
Show answers
More tips
- C Computers and Internet Porn Banner: What It Is and How to Get Rid Of It?...
- F Food and Cooking How many stages of coffee roasting are there?...
- F Food and Cooking From Latte to Espresso: Which Coffee Drink is the Most Popular on Earth?...
- F Food and Cooking Experts Name Top 5 Healthiest Teas...
- C Computers and Internet Google Search Tips and Tricks: Everything You Need to Know...
- H Health and Medicine Discover the Hidden Principles and Real Results of the Japanese Diet...
- H Health and Medicine Liver Cleansing - Rejuvenation for the Body?...
- S Style and Beauty Is Photoepilation the Solution to Unwanted Hair Forever?...
- S Style and Beauty Unbelievable Hairstyles for Long Hair - 2021 Trends...
- H Health and Medicine When can it be said that a person has a normal pulse?...
Answers on questions: Biology
- B Biology A flat topped hill is a ?...
- B Biology How many amino acids are in TAACTG...
- B Biology Describe at least one behavioral trait and one anatomical trait were selected for among the first dog....
- B Biology Explain how autotrophs are able to produce their own food...
- B Biology Tyler wants to know how the growth of tomato plants is affected by the quantities of various gases in the atmosphere. what type of scientific investigation should...
- B Biology How has the definition of culture changed over time?...
- B Biology Sometimes lymph nodes must be surgically removed. although more lymph vessels eventually grow, what result would you expect to see immediately after surgery?...
- B Biology If four languages have similar words for numbers and the names of fish, but different names for a certain disease, what might be concluded about the time at which...
- B Biology One way to address water scarcity is to conserve water. name at least two ways you can conserve water around your home....
- B Biology What was the other type of molecule that some scientists thought might carry genetic information...
Ответ:
gcd(X, Y, Z):- X = Y -> (Z=X->write('TRUE');write(FALSE'))
gcd(X, Y,Z):- X < Y ->(Y1 is Y -X, gcd(X, Y1, Z))
gcd(X, Y, Z):- X > Y-> gcd(Y, X, Z)
Explanation:
The Prolog function gcd() accepts three arguments, calculates the value of the highest common divisor of X and Y arguments and compares the result with the Z variable. If the result is equal to Z, then a true is returned else a false is returned.