A bit of whimsy

Joined
Sep 20, 2022
Messages
237
Reaction score
39
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
592
Reaction score
79
;)
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
237
Reaction score
39
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
237
Reaction score
39
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,274
Messages
2,571,146
Members
48,775
Latest member
satman49

Latest Threads

Top