149k views
4 votes
What is output if month = 9 and day = 21?

User Fukkong
by
7.8k points

1 Answer

4 votes

The output if month = 9 and day = 21 is Second half of the month.

How the output is determined:

The code block checks if the month equals 9 and accepts it.

It then checks if the day is greater than 15.

Given month = 9, which is September

Given day = 21, which comes after 15 but before 22.5 or 23, which is the third quarter of the month.

Since 21 is greater than 15, the output = Second half of the month.

Thus, the output will print Second half of the month.

User Andrea Turri
by
8.7k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.