Using advanced LOC tools (i.e. my eyes and fingers :-) ) I calculate the LOC counts for the two pieces of code are the same ... ignoring blank lines.
For a cyclometric complexity count, you need parseable source code ... in some programming language ... for tools to work. I defer to @d'alar'cop 's answer for a hand calculation and the explanation of how he arrived at it.
But to be honest, LOC and Cyclometric Complexity measures for code like this is not helpful. The two samples do completely different things, so it really makes little difference which is more "complex".
To my mind, CC is only really useful for identifying excessively complex code in a first-pass review of a codebase. Once you've identified the problem areas, an experienced programmer is a better judge of real complexity (i.e. the kind of stuff that makes the code hard to understand) ... and whether that complexity is necessary / inherent in the problem at hand.