Average word length is not passing the test on sololearn. Please help
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { string newWord = Console.ReadLine().Trim(); string []splitWord = newWord.Split(" "); float lengthOfEachWord = 0; int wordCount = splitWord.Length; float averageWord = 0; foreach (string word in splitWord){ lengthOfEachWord += word.Length; //Console.WriteLine(lengthOfEachWord); averageWord = lengthOfEachWord/wordCount; //Console.WriteLine(averageWord); } if (lengthOfEachWord % wordCount == 1){ Console.WriteLine(Math.Floor(averageWord)); //Console.WriteLine((int)averageWord); }else{ Console.WriteLine(Math.Ceiling(averageWord));