+ 1

String.Length and count() doesn’t support by SoloLearn compiler

string jn = Console.ReadLine(); string[] a=jn.Split(' '); string re=""; foreach(string c in a) { re += c; } int co = re.Length; int li = a.Count(); if(co%li==0) { int i = co/li; console.writeline(i); } else { int j = co/li + 1; console.writeline=(j); } What should I do?

24th Mar 2020, 4:59 PM
Mahdi Mohammadi
Mahdi Mohammadi - avatar
6 Answers
+ 1
It works fine.. You have other syntax errors... Case mismatching.. Like Console.WriteLine() Ex: In console.writeline=(j); C not c, W not w, L not l, remove '=' in this.... Same for first Console statement. Remaining fine... Edit: I checked also....
24th Mar 2020, 5:36 PM
Jayakrishna 🇼🇳
+ 1
~ swim ~ I checked my code with Visual Studio it worked correctly But in SoloLearn it doest work
24th Mar 2020, 5:49 PM
Mahdi Mohammadi
Mahdi Mohammadi - avatar
+ 1
coffeeunderrun How did you correct it?I mean what was changed,I see no diffrence between your code and mine
24th Mar 2020, 6:55 PM
Mahdi Mohammadi
Mahdi Mohammadi - avatar
+ 1
coffeeunderrun I didnt see that,Thank you
24th Mar 2020, 6:58 PM
Mahdi Mohammadi
Mahdi Mohammadi - avatar
24th Mar 2020, 6:58 PM
Mahdi Mohammadi
Mahdi Mohammadi - avatar
+ 1
coffeeunderrun thank you for that mention. Mahdi Mohammadi you're Wel come..
24th Mar 2020, 7:05 PM
Jayakrishna 🇼🇳