Home>Article>Backend Development> c language perpetual calendar program code

c language perpetual calendar program code

angryTom
angryTom Original
2020-02-15 17:44:20 7121browse

This article introduces the code for implementing a perpetual calendar program using c language. I hope it will be helpful to friends who are learning c language!

c language perpetual calendar program code

C language perpetual calendar program code

The code for implementing the perpetual calendar program in C language is as follows:

#include  int year(int y) { if ((y%4==0) && (y%100!=0) || y%400==0) return 366; else return 365; } int main() { int y; int i,j,sum=0; int begin,week; int days[12]={31,28,31,30,31,30,31,31,30,31,30,31}; scanf("%d",&y); for(i=1;i
      

c language perpetual calendar program code

Recommended learning:c language video tutorial

The above is the detailed content of c language perpetual calendar program code. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn