r/dailyprogrammer • • Feb 16 '12

[2/16/2012] Challenge #8 [difficult]

Write a program that will take coordinates, and tell you the corresponding number in pascals triangle. For example:

Input: 1, 1

output:1


input: 4, 2

output: 3


input: 1, 19

output: error/nonexistent/whatever


the format should be "line number, integer number"

for extra credit, add a function to simply print the triangle, for the extra credit to count, it must print at least 15 lines.

12 Upvotes

19 comments sorted by

View all comments

Show parent comment

2

u/eruonna Feb 16 '12

Haskell

1

u/[deleted] Feb 16 '12

Oh cool I didn't recognize 'Just'