This paper proposes a classification algorithm based on ensemble neural networks. In the training phase, the proposed algorithm uses a random number of training data to develop multiple random artificial neural network (ANN) models until those ANN models converge. Those models with lower accuracy than the threshold are filtered out. The remaining highly accurate models will be used to predict the output in the testing phase. Meanwhile, the accuracy of ANN models is presented as a weighting value in the testing phase. In the testing phase, the testing data are loaded into the selected ANN models to predict the output class. The output values are multiplied by the corresponding weighting values of ANN models. Then the weighted average of the outputs can be obtained. Finally, the predicted output is converted into the predicted class. We design an augmented reality question answering system (AR-QAS) applying and implementing the proposed algorithm on mobile devices. AR-QAS offers an interactive user interface and automatically replies according to user's queries. By comparing with the logistic regression method and the ANN method, the experiment results demonstrate that the proposed algorithm offers the highest accuracy.