Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- month(1) :-
- write('January').
- month(2) :-
- write('February').
- month(3) :-
- write('March').
- month(4) :-
- write('April').
- month(5) :-
- write('May').
- month(6) :-
- write('June').
- month(7) :-
- write('July').
- month(8) :-
- write('August').
- month(9) :-
- write('September').
- month(10) :-
- write('October').
- month(11) :-
- write('November').
- month(12) :-
- write('December').
- month(_) :-
- write('Invalid month code.').
- go :-
- write('Enter month code: '),
- read(MonthCode),
- month(MonthCode).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement