Ad
  • Custom User Avatar
  • Custom User Avatar

    @lilsweetcaligula

    Actually, the stupid one was me. Although I've read the title which indicates "swap", I've based my solution around the example. in the example, there's only lower case to swap. So I thought (mistakenly) that it was to send all the vowels to upper case. I'm sorry for disturbing you.

  • Custom User Avatar

    @lilsweetcaligula this is really weird, because it shouldn't expect a lower case vowel. Can you take a look at this?

  • Custom User Avatar

    First of all, you code is nice. Congratulations. An improvement (of many) you could do is to test if 'n' is even and equals 2 before the loop (in this case, if it's 2 it is a prime, otherwise it is not). Doing that, 'x' could start from 3 and it could be incremented by two instead of one, because you don't need to verify if it's divisible by another even number. I will be twice as fast (actually, it won't, but you get my point, right?).

  • Custom User Avatar

    The percent variable needs to be a float type.

  • Custom User Avatar

    It is giving out an "Unknown error" message when I submit a Java code. It would be helpful if more details are shown in the message.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution