A bit of whimsy

Joined
Sep 20, 2022
Messages
303
Reaction score
41
Can you write a short simple program that outputs "the quick brown fox" 537 times, without using a loop?
Code:
PROCEDURE DXXXVII()
CALL D()
CALL X()
CALL X()
CALL X()
CALL V()
CALL I()
CALL I()
END

PROCEDURE D()
CALL C()
CALL C()
CALL C()
CALL C()
CALL C()
END

PROCEDURE C()
CALL L()
CALL L()
END

PROCEDURE L()
CALL X()
CALL X()
CALL X()
CALL X()
CALL X()
END

PROCEDURE X()
CALL V()
CALL V()
END

PROCEDURE V()
CALL I()
CALL I()
CALL I()
CALL I()
CALL I()
END

PROCEDURE I()
PRINT "the quick brown fox"
END
 
Joined
Jul 4, 2023
Messages
609
Reaction score
81
;)
Python:
print("the quick brown fox\n" * 537)
Python:
def print_(i=1):
  print(f"{i}. the quick brown fox")
  if i > 536:
    return
  print_(i+1) 

print_()
 
Joined
Sep 20, 2022
Messages
303
Reaction score
41
Here's a weird one.
Code:
Z = "The quick brown fox\n"
PRINT G(F(F(F(G(F(G(F(F(F(F(F(Z))))))))))))
END

FUNCTION F(X)
CONCATENATION OF X AND X
END FUNCTION

FUNCTION G(X)
CONCATENATION OF X AND Z
END FUNCTION
 
Joined
Sep 20, 2022
Messages
303
Reaction score
41
I could write a program in COBOL with an identifier named THEQUICKBROWNFOX.

Leave out one full stop, and then try to compile it.

I'm not sure if it will output 537 error messages about THEQUICKBROWNFOX, but it should be close.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top