Computer simulations based on numerical methods applied to the equilibrium equations of Newtonian mechanics have significant impact in many industries, because they provide cheaper development of products. Using computer simulations, it is possible to investigate behavior of product parts and assemblies under different boundary conditions, loads and applied materials, which significantly reduces the number of real expensive experiments. A large number of simulations can be conducted in order to optimize the geometry, materials, product price, etc. or to confirm that the product satisfies technical and safety requirements. By discretization of equilibrium equations, it is possible to simulate only continuous models, i.e. models whose all parts are physically connected. But a problem that occurs very often is mechanical contact between two or more independent mechanical parts. In case the parts are not physically connected, it is necessary to provide an additional boundary condition using a contact algorithm so that the independent parts would be aware of each other. Because of that, the contact problem between deformable moving bodies is always an interesting topic in computational mechanics and mechanical engineering in general. The problem that initiated the development of the contact algorithm presented in this paper is the possibility of numerical simulation of mechanical tests performed during the development of medical stents with the aim to provide a look inside, to show the state of stress or strain in material of the stent.During the implementation of the contact algorithm, two problems arise: 1. finding contact surfaces between different elastic bodies and 2. preventing the penetration of one body into another body by additional boundary condition. This paper presents the implementation of a contact algorithm by finding boundary surface nodes of a deformable body that have penetrated the boundary surface elements of another deformable bodies, and adding boundary conditions that reverse the penetrated nodes to the body boundary. The algorithm is implemented within the in-house software package for finite element analysis. The software is written in Fortran, which is another challenge, given that Fortran does not have as powerful geometry libraries as other modern programming languages do. The main reason for this was compatibility with existing finite element code and facilitated implementation of future parallelization with the aim of reducing computing time.