vak: (Default)
Serge Vakulenko ([personal profile] vak) wrote2025-01-21 03:56 pm

Как вам такое вычисление факториала на Алголе 68?

BEGIN
...
THE TWELFTH day OF christmas MY TRUE LOVE sent to ME
twelve LORDS LEAPING
eleven LADIES DANCING
ten PIPERS PIPING
nine DRUMMERS DRUMMING
eight MAIDS MILKING
seven SWANS SWIMMING
six GEESE LAYING
five GOLD RINGS
four COLLY BIRDS
three FRENCH HENS
two TURTLE DOVES AND
a PARTRIDGE in a pear tree
END
Полный текст здесь: factorial-baker.a68

Запускаем:
$ a68g factorial-baker.a68 
FACTORIAL OF 10
+10 IS +3628800
Смотрите страницы 51-53 в файле algol-bulletin-42.pdf.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org