The Tomohiko Sakamoto Algorithm is used to find the Day of the week for a given date. The date is provided according to the Gregorian Calendar.
Sample Input and Output format
Input : 09 09 2020 (9th September 2020)
Output : 3 (i.e Wednesday)
Input : 15 08 2012 (15th August 2012)
Output : 3 (i.e Wednesday)
Input : 24 12 2456 (24th December 2046)
Output : (0 i.e Sunday)
Algorithm Explanation/Steps with example:
Consider January 1st 1 AD, which is a Monday as per Gregorian calendar.
Now, fir...
Published on October 12, 2020 23:58