DragonFruit's blog

By DragonFruit, 9 years ago, In English

Hi

I tried to solve a problem by this code: 10907824

but when i run it in my computer i face with a terrible voice that can't stop it and lots of this outputs:

What's wrong?

  • Vote: I like it
  • +9
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it -16 Vote: I do not like it

wrong operating system

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    Can you explain more?

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it +13 Vote: I do not like it

      Looks like a stupid joke about "Windows must die, use Linux".

      • »
        »
        »
        »
        9 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Looks like I hurt feelings of Windows believers

        • »
          »
          »
          »
          »
          9 years ago, # ^ |
            Vote: I like it +1 Vote: I do not like it

          Looks like you raise holy war and insult people instead of answering a very specific question and helping people. I'm stopping at this message.

»
9 years ago, # |
  Vote: I like it +9 Vote: I do not like it

for(int j=0;i<2*n-1;j++)

Bug. You must use j

»
9 years ago, # |
  Vote: I like it +14 Vote: I do not like it

Looks like you haven't ran your code until you wrote full solution. Very bad idea.

You may use code binary search to find the error: comment out half of the code and see if it still fails. Of course, comment from last lines to first, so commenting won't affect execution.

This 'weird voice' is actually your program printing the bell character to the console. Lots of output means that there is either null terminator missing or damaged for some string (if you print strings) or you wrote output loops wrong.

Your case is the second one: for(int j=0;i<2*n-1;j++) — that's the error.

»
9 years ago, # |
Rev. 4   Vote: I like it +15 Vote: I do not like it

this site can be useful for you.