C# source code for floyd algorithm