Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- read(A),
- write('Enter your year of birth'),nl,
- read(B),
- subt(X,B,Y):- Y is (2011)-B,nl,
- asserta(A,Y),nl,
- write('%w%w%w%w','Your name is', A , ' and your age is ', Y).
- information :-
- write('Enter your name'),nl,
- read_line_to_codes(user_input, Name),
- write('Enter your year of birth'),nl,
- read(BirthYear),
- % subt(BirthYear,Age),
- plus(Age,BirthYear,2011),
- format('~s~s~s~d~n',['Your name is ', Name , ' and your age is ', Age]).
- subt(B,Y) :- Y is 2011 - B.
Add Comment
Please, Sign In to add comment