Guest User

Untitled

a guest
Jul 16th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. read(A),
  2.  
  3. write('Enter your year of birth'),nl,
  4.  
  5. read(B),
  6. subt(X,B,Y):- Y is (2011)-B,nl,
  7.  
  8. asserta(A,Y),nl,
  9. write('%w%w%w%w','Your name is', A , ' and your age is ', Y).
  10.  
  11. information :-
  12. write('Enter your name'),nl,
  13. read_line_to_codes(user_input, Name),
  14. write('Enter your year of birth'),nl,
  15. read(BirthYear),
  16. % subt(BirthYear,Age),
  17. plus(Age,BirthYear,2011),
  18. format('~s~s~s~d~n',['Your name is ', Name , ' and your age is ', Age]).
  19.  
  20.  
  21. subt(B,Y) :- Y is 2011 - B.
Add Comment
Please, Sign In to add comment