/qtzq2po2fn4jnl9j

Note

Dominik Hofer
Dominik Hofer

CS50 010

Problem set 1 done.

The Mario exercise was pretty straightforward, but the credit card one took me way longer than expected.

Mainly due to all the things that C doesn't do out of the box and I had to code myself.

But the feeling when seeing this console is 10/10!


Essentially, we had to implement “Luhn’s Algorithm” for validating credit card numbers. It was pretty interesting, learning about this one.

And it involved doing way more math than I expected. I guess with the intro to arrays next week, the whole task would've been easier.


Read more about the algo 👇
https://en.wikipedia.org/wiki/Luhn_algorithm

Follow

RSS Feeds