A continuous-time distributed algorithm is studied for solving linear equations of the form Ax = b with at least one solution. The equation is simultaneously solved by a network of m agents with the assumption that each agent knows only a subset of the rows of the partitioned matrix [A b ], the current estimates of the equation's solution generated by its current neighbors, and nothing more. Neighbor relationships among the agents are described by a piecewise-constant switching directed graph whose vertices correspond to agents and whose arcs depict neighbor relationships. It is shown that for any matrix-vector pair (A, b) for which the equation has a solution and any sequence of repeatedly jointly strongly connected graphs, the algorithm causes all agents' estimates to asymptotically converge to the same solution to Ax = b. The limiting behavior of the algorithm in the case when Ax = b does not have a solution is also studied. It is shown that for any static strongly connected graph, the algorithm causes all agents' estimates to asymptotically converge to different values, and therefore enables the agents to detect the no-solution case distributively.