Using a genetic algorithm owing to high nonlinearity of constraints, this paper first works on the optimal design of two-span continuous singly reinforced concrete beams. Given conditions are the span, dead and live loads, compressive strength of concrete and yield strength of steel; design variables are the width and effective depth of the continuous beam and steel ratios for positive and negative moments. The constraints are built based on the ACI Building Code by considering the strength requirements of shear and the maximum positive and negative moments, the development length of flexural reinforcement, and the serviceability requirement of deflection. The objective function is to minimize the total cost of steel and concrete. The optimal data found from the genetic algorithm are divided into three groups: the training set, the checking set and the testing set for the use of the adaptive neuro-fuzzy inference system (ANFIS). The input vector of ANFIS consists of the yield strength of steel, compressive strength of concrete, dead load, span, width and effective depth of the beam; its outputs are the minimum total cost and optimal steel ratios for positive and negative moments. To make ANFIS more efficient, the technique of Subtractive Clustering is applied to group the data to help streamline the fuzzy rules. Numerical results show that the performance of ANFIS is excellent, with correlation coefficients between the three targets and outputs of the testing data being greater than 0.99.