#include<stdio.h> #define LEAP_YEAR(y) (y%4==0&&y%100!=0||y%400==0)?1:0 typedef struct CCalendar { int m_year; int m_month; int m_date; }CCal; CCal curday; int main() { int mon[12]={31,28,31,30,31,30,31,31,30,31,30,31}; int sum=0,i; scanf("%d%d%d",&curday.m_year,&curday.m_month,&curday.m_date); if(LEAP_YEAR(curday.m_year)==1)mon[1]=29; for(i=0;i<curday.m_month-1;i++) { sum+=mon[i]; } sum+=curday.m_date; printf("%d\n",sum); return 0; }
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题6.10 (C语言代码)浏览:827 |
简单的a+b (C语言代码)浏览:601 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:584 |
C语言程序设计教程(第三版)课后习题1.5 (C++代码)浏览:1114 |
C语言程序设计教程(第三版)课后习题7.5 (C语言代码)浏览:901 |
WU-蓝桥杯算法提高VIP-勾股数 (C++代码)浏览:1685 |
C语言程序设计教程(第三版)课后习题9.6 (C语言代码)浏览:597 |
数对 (C语言代码)浏览:762 |
母牛的故事 (C语言代码)浏览:1046 |
A+B for Input-Output Practice (C语言代码)浏览:506 |