Skin cancer is undoubtedly one of the deadliest diseases, and early detection of this disease can save lives. The usefulness and capabilities of deep learning in detecting and categorizing skin cancer based on images have been investigated in many studies. However, due to the variety of skin cancer tumour shapes and colours, deep learning algorithms misclassify whether a tumour is cancerous or benign. In this paper, we employed three different pre-trained state-of-the-art deep learning models: DenseNet121, VGG19 and an improved ResNet152, in classifying a skin image dataset. The dataset has a total of 3297 dermatoscopy images and two diagnostic categories: benign and malignant. The three models are supported by transfer learning and have been tested and evaluated based on the criteria of accuracy, loss, precision, recall, f1 score and ROC. Subsequently, the results show that the improved ResNet152 model significantly outperformed the other models and achieved an accuracy score of 92% and an ROC score of 91%. The DenseNet121 and VGG19 models achieve accuracy scores of 90% and 79% and ROC scores of 88% and 75%, respectively. Subsequently, a deep residual learning skin cancer recognition (ResNetScr) system has been implemented based on the ResNet152 model, and it has the capacity to help dermatologists in diagnosing skin cancer.