Prim's algorithm takes a square matrix (representing a network with weighted arcs) and finds arcs which form a minimum spanning tree. The network must be connected for a spanning tree to exist.
You can re-enter values (you may need to change symmetric values manually) and re-calculate the solution. The program doesn't work if the minimum spanning tree has weight over one billion. This implementation always chooses to start with column 1. Arcs used are highlighted in red. If the graph is not connected no spanning tree will be found (but some arcs may be highlighted during the process). If the graph is connected the arcs used will be highlighted, and the total weight will be calculated.