/* How old am I puzzle in Picat. From Choco: samples/Examples/HowOldAmI.java: """ Easy simple problem defined by: "Six years ago, my brother was two time my age. In five years, we will have 40 years together. How old am I?" (sorry for the translation :) ) """ This Picat model was created by Hakan Kjellerstrand, hakank@gmail.com See also my Picat page: http://www.hakank.org/picat/ */ import cp. main => go. go ?=> Me :: 0..40, Him :: 0..40, 2*(Me-6) #= Him-6, 40 #= (Me+5) + (Him+5), solve([Me,Him]), println(me=Me), println(him=Him), nl, fail, nl. go => true.