1.1-Introductie-Programmeren

Day-of-week calculator

Difficulty: Filled Filled Outlined

For a given month and day of this year (2023), calculate which day of the week it is. Two data arrays that you can use have been provided.

The idea of this exercise is that you just “keep on looping” through days from the beginning of the year until you have reached the date entered.

Extra hint: You’ll probably want to use the modulo (%) operator!

Example

Example