Challenge 130 from r/dailyprogrammer/: Done in C