3 ms·
That reminds me of this program, which calculates the month and day given the year and the day of the year [0]. There's a version that abuses goto, and one that
by trealira 2y ago
That reminds me of this program, which calculates the month and day given the year and the day of the year [0]. There's a version that abuses goto, and one that stores state in variables and only uses structured statements. You probably won't see people similarly abuse goto today, though. I think it was translated from Fortran.
[0]: https://craftofcoding.wordpress.com/2020/02/12/the-world-of-unstructured-programming-i-e-spaghetti-code/ https://craftofcoding.wordpress.com/2020/02/12/the-world-of-...