[SOLVED] Prolog代写: Prolog Assignment

30 $

File Name: Prolog代写:_Prolog_Assignment.zip
File Size: 292.02 KB

SKU: 4793569215 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


Prolog Assignment

Create a program that solves the logic puzzle below. Your program MUST actually SOLVE the puzzle, not just print the results. The program must find one and only one solution to the logic puzzle and that one solution must meet all of the constraints listed below.

  • Fuel Stop charges somewhat less per gallon than Vexon.
  • The business in Irvine charges somewhat more per gallon than the business in Santa Rosa.
  • Gas-N-Go doesn’t charge $1.23 per gallon.
  • The gas station in Lewis charges 8 cents less per gallon than the store in Zamora.
  • Fuel Stop charges 8 cents less per gallon than the store in Santa Rosa.
  • The business in Lewis is either Vexon or Energo.
  • Fuel Stop charges 4 cents less per gallon than Ballantines.

Hints:

  1. Prolog doesn’t deal well with floating point. What other form could you use?
  2. Remember that variables are capitalized and atoms are all lower case.
  3. Look at the slides (especially the logic puzzle) carefully – you can reuse code from the slides.

Get it here: http://www.swi-prolog.org/

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Prolog代写: Prolog Assignment
30 $