第12周项目1:法二
来源:互联网 发布:装完ubuntu后 编辑:程序博客网 时间:2024/05/21 15:03
#include<iostream>using namespace std;int days(int y, int m, int d);int main(){ int year, month, day; cout<<"输入年 月 日"<<endl; cin>>year>>month>>day; cout<<"这是该年的第"<<days(year, month, day)<<"天"<<endl; return 0;}int days(int y, int m, int d){ int sum=d; //加上前m-1月的天数 for(int i=1; i<m; i++) { if(i==1||i==3||i==5||i==7||i==8||i==10||i==12) sum+=31; else if (i==4||i==6||i==9||i==11) sum+=30; else sum+=((y%4==0&&y%100!=0)||y%400==0)?29:28; } return sum;}
- 第12周项目1:法二
- 第12周项目二
- 第12周 项目二
- 第14周 项目二(1)
- 第11周项目二
- 第13周 项目二
- 第14周项目二
- 第14周项目12-字符串统计(二)
- 第12周 项目二 教师兼干部类
- 2014-第12周项目二--教师兼干部类
- 第12周 项目二-摩托车继承自行车和机动车
- 第12周 【项目二】 Dijkstra算法的验证
- 第15周项目二—洗牌(1)
- 第12周项目1-阅读程序(2)全局变量(二)
- 第12周 【项目1
- 第6周项目二-程序填空
- 第14周项目二-Shape
- 第14周项目一任务二
- 第12周项目7-建立1000以内的素数、回文数、回文素数多文件组织
- MyEclipse 9本地安装插件(MyEclipse 9 M1)
- 对数组a[10]的几个理解
- Linux命令的返回值
- OPENWRT使用命令行设置无线和有线网络
- 第12周项目1:法二
- poj 2481 Cows
- PHP 上传失败提示错误编码6 解决方案:
- 在linux环境下封装课程设计
- 第12周项目1:法三(运用数组)
- ECSHOP首页调用指定分类下的商品
- java 异常处理的总结
- HierarchicalDataTemplate 动态菜单 Command 绑定
- 我的管理思想