Skin cancer is common and a serious disease, which can lead to death if not treated in time. Melanoma is the rarest and most dangerous type of skin cancer. It causes the most deaths. As in all diseases, early and correct detection of skin cancer are very important. Computer Aided Diagnosis systems can help physicians and patients make better decisions. Especially, machine learning and deep learning use effectively in Computer Aided Diagnosis systems. In this study, an automatic detection system for melanoma is suggested. To illustrate the advantage of the proposed CNN model C4Net, a comprehensive experimental study has been carried out. In addition, the proposed C4Net has been compared with not only the existing deep learning algorithms such as AlexNet, GoogLeNet, ResNet and VGGNet but also conventional machine learning algorithms such as Artificial neural networks, k-Nearest neighbor algorithm and Support vector machine. In experimental studies, C4Net, which is designed as deep neural network model for melanoma detection, has obtained more classification accuracy than other methods with 96.94%.