C
C#14mo ago
Isaaaak

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?)
No description
4 Replies
reflectronic
reflectronic14mo ago
are you sure DigitalRoot is supposed to return long?
Isaaaak
IsaaaakOP14mo ago
hmm, it was int before but I changed it maybe I can't do that?
reflectronic
reflectronic14mo ago
the problem is probably that the test code expects it to be an int
Isaaaak
IsaaaakOP14mo ago
ah thoughts I could change it lemme see ah seems to work
Want results from more Discord servers?
Add your server