Advertisement
Guest User

main.pl

a guest
Jun 6th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.28 KB | None | 0 0
  1. :- module(main,_).
  2. :- use_package(.(for_loop)).
  3.  
  4.  
  5.  
  6. %main :- for I = 3 to 8 do (M is I*I,display(M),nl).
  7. %main :- for 2 to 6 do 1.
  8.  
  9. main:-
  10.     for I = 3 to 8 do (M is I*I,display(M),nl),
  11.     for D = 1 to 8 do (R is D+D,display(R),nl),
  12.     for J = 1 to 8 do (X is J,display(X),nl).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement