How to resolve the algorithm Day of the week step by step in the МК-61/52 programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Day of the week step by step in the МК-61/52 programming language
Table of Contents
Problem Statement
A company decides that whenever Xmas falls on a Sunday they will give their workers all extra paid holidays so that, together with any public holidays, workers will not have to work the following week (between the 25th of December and the first of January).
In what years between 2008 and 2121 will the 25th of December be a Sunday? Using any standard date handling libraries of your programming language; compare the dates calculated with the output of other languages to discover any anomalies in the handling of dates which may be due to, for example, overflow in types used to represent dates/times similar to y2k type problems.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Day of the week step by step in the МК-61/52 programming language
Source code in the мк-61/52 programming language
П9 7 П7 1 П8 НОП ИП8 2 2 -
1 0 / [x] П6 ИП9 + 1 8 9
9 - 3 6 5 , 2 5 * [x]
ИП8 ИП6 1 2 * - 1 4 - 3
0 , 5 9 * [x] + 2 9 +
ИП7 + П4 ИП4 7 / [x] 7 * -
x=0 64 ИП9 С/П ИП9 1 + П9 БП 06
You may also check:How to resolve the algorithm Metered concurrency step by step in the Wren programming language
You may also check:How to resolve the algorithm UTF-8 encode and decode step by step in the Elena programming language
You may also check:How to resolve the algorithm Extensible prime generator step by step in the CoffeeScript programming language
You may also check:How to resolve the algorithm Long multiplication step by step in the Ursala programming language
You may also check:How to resolve the algorithm Bulls and cows step by step in the Delphi programming language