For all of you who at some point had to implement the Floyd-Warshall algorithm out there, here is a possible way of doing it on C:
This code includes the necessary functions to calculate the path within the network, once the algorithm has been executed. The files include an input and output example.
If you don’t know how the Floyd-Warshall algorithm works then i suggest you read the following Wikipedia article:
I very much doubt i could explain it much better here, but I hope my code can take some of the work off!