Why does is this code not working ? | Sololearn: Learn to code for FREE!

0

Why does is this code not working ?

I'm trying to find the most repeated character in the string, but it's not working, it keeps giving me 0. Please can someone help me. I'm using c#. https://code.sololearn.com/cWBLfW22vKKp/?ref=app

4/30/2020 9:49:24 PM

Joseph Oritseweyinmi

3 Answers

New Answer

+2

The main issue is that you are not comparing the characters. See in my example how you can solve it using a dictionary. https://code.sololearn.com/cUXV1Y25Awxy/?ref=app

+2

I Dunno what you are trying to with those loops j>convert.length make it less than and it prints 10

+1

@Manu that's obviously he/she doesn't want to , didn't need to provide solution i guess,they were obviously asking for code ,almost anyone can tell for loop doesn't do anything accept looping through things