Code works in VS but not in Codewars
I tried doing a beginner problem with Codewars. For some reason it works in VS but gets an error when I put it into Codewars. Anyone got a clue what's wrong?
tests/Fixture.cs(16,12): error CS0266: Cannot implicitly convert type 'long' to 'int'. An explicit conversion exists (are you missing a cast?)
4 Replies
are you sure
DigitalRoot
is supposed to return long
?hmm, it was int before but I changed it
maybe I can't do that?
the problem is probably that the test code expects it to be an int
ah
thoughts I could change it
lemme see
ah seems to work