Hello there,
not quite sure whether this is the section to do this, but whatsoever.
The task is to explain the main() function. So here I go:
Basically, I think, it is somehow like a definition function for everything that is indented below. The range of difficulty goes from int difficulty (2) up to max (10).
The while function checks whether the inputted number is in this range or not.
If it fulfills the necessary requirement (range from 2-10) it’s performing the following code. And this is the point where I have no clue anymore.
Anyway, I hope you like my explanation and I am already hyped for looking back at this in 1-5 years from now on!
Best regards,
K E T N