提高篇第16-19课第三题
来源:互联网 发布:mac小技巧 编辑:程序博客网 时间:2024/05/22 16:45
#include <stdio.h>#include <stdlib.h>//第三题#include<stdio.h>int days(int y, int m, int d);int main(){int year, month, day;printf("输入年 月 日: ");scanf("%d %d %d", &year, &month, &day);printf("这是该年的第 %d 天\n", days(year, month, day));return 0;}int days(int y, int m, int d){int day=0,i;int month[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };for (i = 0; i <m; i++)day += month[i];day += d;if ((y % 400 == 0) || (y % 4 == 0 && y % 100 != 0))if (m>2)day += 1;return day;}
0 0
- 提高篇第16-19课第三题
- 提高篇第2-5课第三题
- 提高篇第6-10课作业第三题
- 提高篇第20-21课第三题
- 提高篇第26-27课第三题
- 提高篇第28-31课第三题
- 提高篇第16-19第五题
- 提高篇第16-19课第四题
- 第32课第三题
- 第33课第三题
- 第35课第三题
- 第36课第三题
- 第37课第三题
- 第39课第三题
- 第43课第三题
- 第三章第16题
- 提高篇 第16-19课后---项目2 - 成绩处理
- 提高篇 第16-19课后---项目3-4
- Merge Intervals
- 有用的小常识
- RSA公钥密码算法的原理及实现(一)
- UVa 1616 Caravan Robbers
- PHP常用函数
- 提高篇第16-19课第三题
- 深入浅出之正则表达式(一)
- 窗函数
- 前端之路开山篇
- 深入浅出之正则表达式(二)
- 参数化测试运行器
- C++中placement new操作符
- hdu 4000 Fruit Ninja(树状数组)
- 【MFC】如何在mfc窗口程序中调用控制台