Skip to content

Instantly share code, notes, and snippets.

@AlecsFerra
Last active December 8, 2021 15:14
Show Gist options
  • Save AlecsFerra/e263a6912b897b62ae20a127db482e13 to your computer and use it in GitHub Desktop.
Save AlecsFerra/e263a6912b897b62ae20a127db482e13 to your computer and use it in GitHub Desktop.
A compiler friendly calculator
print("""
main = do
print "Welcome to my addition calculator :)"
a <- getLine
b <- getLine
print $ add (read a) (read b)
""")
for i in range(1000):
for j in range(1000):
print(f'add {i} {j} = "{i} + {j}"')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment