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