Juliet C. answered 05/12/21
Multiple semesters of teaching intro to programming courses using C
As a computer scientist, your task is to turn mathematical ideas into functional code so that the computer can solve a problem conveniently for humans. In this case, you need to look up the mathematical idea of Zeller's Congruence, which is a mathematical formula that takes the number representation of the month, the day of the month, and the year and calculates the day of the week, and convert it into code for your chosen programming language. Your program has to ask the user for the date and from the user's input it needs to get the month, day, and year as numbers to put into the mathematical formula that you have translated into computer code. Once the day of the week is calculated as a number using Zeller's Congruence, your program needs to take that number and display the name for that day of the week. In addition, your program needs to have a particular piece of information unique to each day of the week to display based on the day of the week that is calculated. If you are familiar with arrays, you could have one array for the names of the days of the week and one array for the unique pieces of information, and then use the number of the day of the week that is computed by the Zeller's Congruence formula as the index into those arrays to retrieve the appropriate information for your program to output.