Seshadri M

Seshadri M

  • NA
  • 69
  • 17.7k

Maximum number of occurence digits from given string

Oct 6 2017 1:36 PM
/Maximum number of occurence digits from given string
// 123mlklk123123lkl11lmlkm44111 
// 111
//44  
 
I have tryed using this but i stucked.
string s = Console.ReadLine();
char[] c = s.ToCharArray();
for( int i =0; (c[i]=='0' ||c[i]=='0' ||c[i]=='1' ||c[i]=='2' ||c[i]=='3' ||c[i]=='4' ||c[i]=='5' ||c[i]=='6' ||c[i]=='7' ||c[i]=='8' ||c[i]=='9') &&(c[i]<=s.Length); i++)
{
Console.Write(c[i]);
char cn = c[i];
for (int j =0; c[j] < s.Length; j ++)
{
// Console.WriteLine(s[j]);
}
}
Console.ReadLine();


Answers (1)