Ad
  • Custom User Avatar

    That's all very pretty but my keyboard doesn't have less than and greater than signs. The only way I could write a less than sign character was by pasting the character into the code editor. Now I can't do my training, but I think is well done that we can't paste anything into code editors.

  • Default User Avatar

    you're forgetting when n is equal to 1. There's a simpler mathematical solution.
    I gave my answer with one for loop and two if statements.