java输入日期计算天数天数,将它按年月天的形式输出

您的举报已经提交成功,我们将尽快处理,谢谢!
刚交了一任务,给的装备不错
大家还关注
(window.slotbydup=window.slotbydup || []).push({
id: '2081942',
container: s,
size: '1000,60',
display: 'inlay-fix'下面这个编程是,根据输入的年份和月份,输出该月份的天数,用if-else语句_百度知道
下面这个编程是,根据输入的年份和月份,输出该月份的天数,用if-else语句
&month);if((month==1)||(month==3)||(month==5||(month==7)||(month==8)||
(month==10)||(month==12))result=31;elseresult=28;printf(&quot,%d&else{if(year%100==0){if(year%400==0)result=29;%d;%d&quot,result););;scanf(&Input the year and month
&}}printf(&quot.h&else if((month==4)||(month==6)||(month==9)||(month==11))result=30;}else{if(year%4==0)result=29;elseresult=28,&;int main(){int year#include&lt
我有更好的答案
|------有31天的月份:1 ,3, 5 ,7, 8 ,10, 12
year,month----|
|-----固定天数的月:4, 6 ,9 ,11
|------非31天的月份:-----|
|-----变动天数的月:2
判断是否为闰年
其他类似问题
为您推荐:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁博客访问: 74712
博文数量: 67
博客积分: 0
博客等级: 民兵
技术积分: 729
注册时间:
认证徽章:
〆 没有伞的孩子必须学会努力奔跑 つ
IT168企业级官微
微信号:IT168qiye
系统架构师大会
微信号:SACC2013
发布时间: 18:31:48
输入年份year和天数day,打印出_月_日点击(此处)折叠或打开#include int is_leapyear(int year){&&&&int flag=0;&&&&if(year%400==0 || (year%100 && year%4==0))&nbs.........
阅读(279) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
马伟东:。。。。。。。。。。。。。。。。。。。。。
。。。。。。。。。
。。。。。。。。。。。。。。。。。。。。。
请登录后留言。(window.slotbydup=window.slotbydup || []).push({
id: '2081942',
container: s,
size: '1000,60',
display: 'inlay-fix'共有 2778 人关注过本帖
标题:从键盘输入一个数据(1~12),表示2014年的某个月份,输出该月份对应的天数 ...
等 级:新手上路
&&已结贴√
&&问题点数:20&&回复次数:3&&&
从键盘输入一个数据(1~12),表示2014年的某个月份,输出该月份对应的天数。
#include&stdio.h&
void main()
&&& printf(&please enter a number&);
&&& scanf(&%d&,&a);
&&& if(a==2)
&&&&&&&&printf(&29 days&);
&&& else if(a==1||3||5||7||8||10||12)
&&&&&&&&printf(&31 days&);
&&&&&&&&printf(&30 days&);
30天的错误&&求解 求指导
搜索更多相关主题的帖子:
等 级:友情版主
威 望:161
帖 子:3767
专家分:19954
&&得分:10&
程序代码:#include &stdio.h&
int main( void )
&&& printf( &Please enter a number: & );
&&& if( scanf(&%d&,&a)==<font color=# && a&=<font color=# && a&=<font color=# )
&&&&&&&&if( a == <font color=# )
&&&&&&&&&&&&printf( &<font color=# days& );
&&&&&&&&else if( a==<font color=# || a==<font color=# || a==<font color=# || a==<font color=# || a==<font color=# || a==<font color=# || a==<font color=# )
&&&&&&&&&&&&printf(&<font color=# days&);
&&&&&&&&else
&&&&&&&&&&&&printf(&<font color=# days&);
&&& return <font color=#;
但你应该用数组 或 switch完成。
等 级:友情版主
威 望:161
帖 子:3767
专家分:19954
2014年的二月份是29个月???
来 自:李掌柜
等 级:贵宾
威 望:41
帖 子:1317
专家分:6927
&&得分:10&
2014年的二月份是28天
版权所有,并保留所有权利。
Powered by , Processed in 0.043236 second(s), 8 queries.
Copyright&, BCCN.NET, All Rights Reserved

我要回帖

更多关于 qq输入法活跃天数 的文章

 

随机推荐