A deep learning powerful models of machine learning indicated better performance as precision and speed for images classification. The purpose of this paper is the detection of patients suspected of pneumonia and a novel coronavirus. Convolutional Neural Network (CNN) is utilized for features extract and it classifies, where CNN classify features into three classes are COVID-19, NORMAL, and PNEUMONIA. In CNN updating weights by CNN backpropagation and SGDM optimization algorithms in the training stage. The performance of CNN on the dataset is a combination between Chest X-Ray dataset (1583-NORMAL images and 4272-PNEUMONIA images) and COVID-19 dataset (126-images) for automatically anticipate whether a patient has COVID-19 or PNEUMONIA, where accuracy 94.31\% and F1-Score 88.48\% in case 60\% training, 20\% testing, and 20\% validation.