Ad
  • Default User Avatar

    I agree with what was already said. It needs to be clear in the description that it loops back to 11 when goin below 0 and back to 0 when it goes above 11. I would also suggest making this kata a little more interesting by including double flats and double sharps. It would just be something more to add that could make it the slightest bit more challenging. For instance, then, you would have to differentiate between there being only one 'b' or there being two 'bb' (single versus double flat.) For sharps, a single sharp would still be '#'; however, a double sharp would be represented by an 'x', or two sharp signs, but I would reccomend an 'x' to make it more interesting. Look up a double sharp sign if you don't know what it looks like - an 'x' most accurately represents it. Sorry for rambling, but I hope you take my suggestions into consideration.

  • Default User Avatar

    Sounds like you're declaring a variable but never assigning it a value before you are trying to read its value.
    int i; // i is not initialized (but declared)
    j = i + 1; // error

    int i = 0; // i is initialized and declared
    j = i + 1; // j = 1

  • Default User Avatar

    I have a problem in general, not just with this Kata. I can declare an int inside of a for loop, but if I try to declare one outside of a for loop, it doesn't work. Is there something that I am doing wrong? Can you not declare new variables inside of a function? If I try to declare a variable and use it later on, it says that the variable might not have been initialized. Can anyone help explain? Thanks!