subject

(science: day of the week) zeller’s congruence is an algorithm developed by christian zeller to calculate the day of the week. the formula is h = (q + 26(m+1)//10 + k + k//4 +j//4 +5j) % 7 where - h is the day of the week (0: saturday, 1: sunday, 2: monday, 3: tuesday, 4: wednesday, 5: thursday, 6: friday). - q is the day of the month. - m is the month (3: march, 4: april, 12: december). january and february are counted as months 13 and 14 of the previous year. - j is year//100. - k is the year of the century (i. e., year % 100). write a program that prompts the user to enter a year, month, and day of the month, and then it displays the name of the day of the week.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
)a grad student comes up with the following algorithm to sort an array a[1..n] that works by first sorting the first 2/3rds of the array, then sorting the last 2/3rds of the (resulting) array, and finally sorting the first 2/3rds of the new array. 1: function g-sort(a, n) . takes as input an array of n numbers, a[1..n] 2: g-sort-recurse(a, 1, n) 3: end function 4: function g-sort-recurse(a, `, u) 5: if u ⒠` ≤ 0 then 6: return . 1 or fewer elements already sorted 7: else if u ⒠` = 1 then . 2 elements 8: if a[u] < a[`] then . swap values 9: temp ↠a[u] 10: a[u] ↠a[`] 11: a[`] ↠temp 12: end if 13: else . 3 or more elements 14: size ↠u ⒠` + 1 15: twothirds ↠d(2 ◠size)/3e 16: g-sort-recurse(a, `, ` + twothirds ⒠1) 17: g-sort-recurse(a, u ⒠twothirds + 1, u) 18: g-sort-recurse(a, `, ` + twothirds ⒠1) 19: end if 20: end function first (5 pts), prove that the algorithm correctly sorts the numbers in the array (in increasing order). after showing that it correctly sorts 1 and 2 element intervals, you may make the (incorrect) assumption that the number of elements being passed to g-sort-recurse is always a multiple of 3 to simplify the notation (and drop the floors/ceilings).
Answers: 3
question
Computers and Technology, 23.06.2019 04:00
Another name for addicting games.com
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
You know the right answer?
(science: day of the week) zeller’s congruence is an algorithm developed by christian zeller to cal...
Questions
question
Mathematics, 19.02.2021 17:50
question
Mathematics, 19.02.2021 17:50
question
Arts, 19.02.2021 17:50
question
Biology, 19.02.2021 17:50
question
Biology, 19.02.2021 17:50