Question
program Appointment; uses Crt; var num :integer; begin ClrScr; writeln('please choose a day to list available appointment 1 for sunday 5 for thursday or -1
program Appointment; uses Crt; var num :integer; begin ClrScr; writeln('please choose a day to list available appointment 1 for sunday 5 for thursday or -1 to exit. '); readln(num); while num <> -1 do begin case (num) of 1:begin writeln('Sunday : '); writeln('5:30 , 6:00 and 8:00'); end; 2:begin writeln('Monday : '); writeln('4:00 and 8:30'); end; 3:begin writeln('Thursday : '); writeln('4:00 and 8:00'); end; 4:begin writeln('wednesday : '); writeln(' 6:00 and 6:30'); end; 5:begin writeln('Thursday : '); writeln('4:00 , 4:30 , 6:30 , 7:30 , 8:00 , 8:30'); end; otherwise writeln('Please enter a number from 1 to 5 or -1 to exit . '); end; writeln('please choose a day to list available appointment 1 for sunday 5 for thursday or -1 to exit. '); readln(num); end; end. :convert this code to prolog code
another answer please
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started