Work

2006 · Where it all started

Pascal's triangle

My very first program, written in high school (2006): a little C tool that expanded (a + b)ⁿ for any power. No technical merit whatsoever — but it's where it all started.

  • C

The original code is long gone, and honestly that’s for the best. But it’s the first program I ever wrote for fun, and on those grounds it earns its spot here.

High school, 2006. We were learning the binomial identities — (a + b)², then the cube. I figured: why expand one case when you can do them all? I hacked together a C program that took a power n and printed the coefficients row by row. Without realizing it, I was recomputing Pascal’s triangle: every number is the sum of the two above it.

Nothing serious. But that’s where it clicked — a calculation you redo by hand can become a rule, and a rule can become a program. Here’s a web version to play with: type a number of rows, hit Enter, and watch the triangle build itself.

pascal.c — ./pascal