Description
ENGINEERING COMPUTATION Assignment 1
Description
where:
• q is the day.
• j is the zero-based century of the year. In a 4-digit year, this is the rst two digits.
• k is the o set of the year within its century. In a 4-digit year, this is the last two digits.
Here are some example values:
• for 1990-06-13: j = 19,k = 90,m = 6,q = 13
Assignment
This is the outline of the program:
3. Get an end year from the user.
4. Determine the day of the week and print it.
5. For the remaining years as described above, count how many of the sameday-and-month fall on the same weekday and print the result.
6. End the program with a success code.
Below are some example runs:
Same day-and-month on same weekday between 1901 and 1999: 14
Rules
• Your source code le has to have the name assignment1.c .
• Your program will be compiled using the following command on a Linux system. If it cannot be compiled and linked using this command, it will not be graded (failed submission).
gcc -std=c99 -Wall -Werror assignment1.c -o assignment1
• Your program will be checked using an automatic checker. Therefore, make sure you print the messages exactly as given in the example runs.
• Do NOT use any construct that hasn’t been covered in the course thus far such as de ning your own functions. Also use no C++ features such as cout and cin.
• Do NOT use any external functions except for printf and scanf.
• Make sure your coding style is proper and consistent. Use the clang-format tool if necessary. Don’t use any variable names in a language other than English.
• This is an individual assignment. Collaboration in any form is NOT allowed. No working together , no sharing code in any form including showing code to your classmates to give them ideas.
• All the code you submit must be your own. Don’t copy/paste any piece of code from any resource including anything you’ve found on the Internet.
Reviews
There are no reviews yet.