Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A new club opened up and they have three programs. Write ONE long logical statem

ID: 3636124 • Letter: A

Question

A new club opened up and they have three programs. Write ONE long logical statement in c++, using and, or, and not conditions with the necessary variables definitions to cover the following rules:
a) All children under 18 are allowed to enter only on Sundays from 8:00 am until 5:00 pm .

b) Young adults between the ages of 18 and 54 may enter the club after 5:00 pm except on Sundays. Males are allowed in on odd days and females on even days unless the day falls on a Friday then both young adults may enter the club after 5:00 pm regardless if it is odd or even.

c) Seniors, age 55 and older, may enter the club only on Sundays after 5:00 pm

Explanation / Answer

please rate - thanks

color coded to parts a,b, c

a) All children under 18 are allowed to enter only on Sundays from 8:00 am until 5:00 pm .

b) Young adults between the ages of 18 and 54 may enter the club after 5:00 pm except on Sundays. Males are allowed in on odd days and females on even days unless the day falls on a Friday then both young adults may enter the club after 5:00 pm regardless if it is odd or even.

c) Seniors, age 55 and older, may enter the club only on Sundays after 5:00 pm

if((age<18 &&(day==Sunday&&(time>=800&&time<=1700)))
|| (((age>=18&&age<=54)&&(time>1700&&day!=Sunday))&&
      ( (gender==Male&&date%2==1)||(gender==Female&&date%2==0))
       ||(day==Friday&&time>1700))
||( age>=55 && day==Sunday &&time>1700))

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote