I'm trying to have the user input their birthday so I can tell them their zodiac sign. However, I'm having trouble getting their actual birthday and month. Could someone please help me? I've tried separating the reads into different functors, but I keep getting errors. The error I get when I combine both reads is "Syntax error: Operator priority clash." The error I get when I separate both reads is "ERROR: =:=/2: Arguments are not sufficiently instantiated."
Code when I combine the reads:
start :-
read_month,
read_month :-
write('Enter your birth month (month followed by a .): '),
nl,
read(X),
write('Enter your day of birth (followed by a .): '),
nl,
read(Y),
horoscope(X,Y).
Code when I separate the reads:
start :-
read_month,
read_day.
read_month :-
write('Enter your birth month (month followed by a .): '),
nl,
read(X).
read_day :-
write('Enter your day of birth (followed by a .): '),
nl,
read(Y),
horoscope(X,Y).