C++ Application to solve linear circuit