Question: write in fortranthanks 2. Given a date, it is possible to determine the day of the week for that date using the following algorithm (use
2. Given a date, it is possible to determine the day of the week for that date using the following algorithm (use integer division throughout): . Let y be the 4-digit year, m be a 2-digit value corresponding to the month (for example, for March m = 3, and for November m = 11), and d be the 2-digit day. . If m is equal to 1 or 2 then reduce y by 1 Set p = last two digits of y. Set q = first two digits of y. Set r = ((m + 9) mod 12) + 1. Set s = 13 Set t Set u= . Set u = d + P + s +1 + u + 51. Set w= u mod 7. The day of the week is given by the value of w, where w = 0 would be Sunday Write a Fortran program to implement this algorithm, asking the user for the year, month and day (each in the form of a numerical value). Your code should inelnde the following subprograms
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
