Jater

Simple tasks

Oct 20th, 2013
83
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. implement main
  2.     open core,stdio
  3.  
  4. constants
  5.     className = "main".
  6.     classVersion = "".
  7.    
  8. class predicates
  9.     гора:(string,string,integer) nondeterm anyflow.
  10.     name:().
  11.     tyan:().
  12.  
  13. clauses
  14.     classInfo(className, classVersion).
  15.    
  16.     гора("Тянь-Шань","вершина1",4000).
  17.     гора("Тянь-Шань","вершина2",5000).
  18.     гора("Тянь-Шань","вершина3",6000).
  19.     гора("Алтай","вершина1",4050).
  20.     гора("Алтай","вершина2",5000).
  21.     гора("Кавказ","вершина1",4000).
  22.     гора("Кавказ","вершина2",5600).
  23.    
  24.     name():-
  25.         гора(X,_,Y), if Y<5000 then write(X,", ") else  end if, fail.
  26.     name().
  27.    
  28.     tyan():-
  29.         гора("Тянь-Шань",V,_), write(V,", "),fail.
  30.     tyan().
  31.  
  32. clauses
  33.     run():-
  34.         console::init(),
  35.         name(), nl, tyan(),
  36.         succeed(). % place your own code here
  37. end implement main
  38.  
  39. goal
  40.     mainExe::run(main::run).
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×