第十二周项目五 判断当年第几天(数组法)
来源:互联网 发布:手机摇奖软件 苹果 编辑:程序博客网 时间:2024/05/17 23:04
问题及代码
/* *ALL rights reserved. *文件名称:shierzhouxiang5-2 *作者:李长鸿 *完成时间:2014.12.10 *问题描述:判断当年第几天 */ #include <iostream>using namespace std;int main(){ int i,d=0,m,y; int days[13]= {0,31,28,31,30,31,30,31,31,30,31,30,31}; cout<<"请依次输入日,月,年:"<<endl; cin>>d>>m>>y; for(i=1; i<m; i++) d=days[i]+d; if((y%4==0&&y%400==0)||y%100==0) d=d+1; cout<<"这个日子为当年第"<<d<<"天"<<endl; return 0;}
0 0
- 第十二周项目五 判断当年第几天(数组法)
- 第十二周项目五 输出当年第几天( switch 分支法)
- 第十二周项目一 当年第几天
- 第十二周项目1-当年第几天
- 第十二周-当年第几天
- 第十二周项目-1函数运用 当年第几天
- 第11周项目五 当年第几天
- 第十一周项目五:当年第几天(改进版)
- 第十一周项目五 当年第几天
- 第十一周项目五: 当年第几天
- 第十一周项目五 当年第几天
- 第十一周 项目五: 当年第几天
- 第十一周项目五:当年第几天
- 第十一周 项目五 当年第几天
- 第十一周项目五:当年第几天
- 第十一周项目五 当年第几天
- 第十一周项目五 当年第几天
- 第十一周 项目五 当年第几天
- zend studio 10破解/汉化
- CMake tips
- 学习之角点检测Harris
- iOS 对于block的理解
- 计算机视觉与模式识别代码合集第二版one
- 第十二周项目五 判断当年第几天(数组法)
- adt 添加库文件夹
- Linux tar command
- Thread Dump线程死锁检测工具(JStack)的使用详解
- 论数据结构中的内排序和外排序
- HTML5实例——图像及动画
- 2015年
- HDU2614Beat(DP状态压缩路径)
- Maven学习笔记003——使用入门