+ 4

[SOLVED] [C#] Help me debug my code (Keprekar's constant challenge).

I was trying out the solution for the easy difficulty for Keprekar's constant challenge and I have some bugs in my code. I'll greatly appreciate if someone can help me debug it. Post: https://www.sololearn.com/learn/6575/?ref=app Code: https://code.sololearn.com/cynVlRo0laP0/?ref=app

7th Apr 2018, 11:14 AM
Rusty.Metal
6 Answers
+ 4
Use this for line 37: return KaprekarCalculator(_kaprekar, _max, _min); And put some print statements in your code, like: Console.WriteLine(_kaprekar); Console.WriteLine(_maxr); Console.WriteLine(_min); These values should have 4 digits, they have more than that.
7th Apr 2018, 4:45 PM
Paul
Paul - avatar
+ 4
Solved it guys Paul Jacobs Jeya Mc The major bug was in the ToNumber method. Thanks guys.
7th Apr 2018, 5:26 PM
Rusty.Metal
+ 3
Edho enala mudinjathu bro Jeya Mc 😁
7th Apr 2018, 4:57 PM
Rusty.Metal
+ 1
parvala illa. Bro intha alavukku coding eluthi irukinga
7th Apr 2018, 4:45 PM
Jeya Prakash J
Jeya Prakash J - avatar
+ 1
yes bro its working 🙌 congrats 😇
7th Apr 2018, 5:31 PM
Jeya Prakash J
Jeya Prakash J - avatar
0
okay bro coding mudichittu answer vantha sollunga naan paathu ethuna doubt na kettukiren😁😄😉
7th Apr 2018, 5:04 PM
Jeya Prakash J
Jeya Prakash J - avatar