Skin cancer is one of the major types of cancer with an increasing incidence in recent decades. The source of skin cancer arises in various dermatologic disorders. Skin cancer is classified into various types based on texture, color, morphological features, and structure. The conventional approach for skin cancer identification needs time and money for the predicted results. Currently, medical science is utilizing various tools based on digital technology for the classification of skin cancer. The machine learning-based classification approach is the robust and dominant approach for automatic methods of classifying skin cancer. The various existing and proposed methods of deep neural network, support vector machine (SVM), neural network (NN), random forest (RF), and K-nearest neighbor are used for malignant and benign skin cancer identification. In this study, a method was proposed based on the stacking of classifiers with three folds towards the classification of melanoma and benign skin cancers. The system was trained with 1000 skin images with the categories of melanoma and benign. The training and testing were performed using 70 and 30 percent of the overall data set, respectively. The primary feature extraction was conducted using the Resnet50, Xception, and VGG16 methods. The accuracy, F1 scores, AUC, and sensitivity metrics were used for the overall performance evaluation. In the proposed Stacked CV method, the system was trained in three levels by deep learning, SVM, RF, NN, KNN, and logistic regression methods. The proposed method for Xception techniques of feature extraction achieved 90.9% accuracy and was stronger compared to ResNet50 and VGG 16 methods. The improvement and optimization of the proposed method with a large training dataset could provide a reliable and robust skin cancer classification system.