ZKX's LAB

C语言如何判断某年某月有几天 c语言中计算某年某月有几天

2021-04-04知识10

关于C语言简易编程 计算某年某月多少天 |#includevoid main(){int year,month;printf(\"\\n Please input year:\\n\");scanf(\"%d\",&year);printf(\"enter month:\\n\");scanf(\"%d\",&month);if(year%4=0){if(month=2)printf(\"\\n day=d\",29);else{if(month=4|month=6|month=9|month=11)printf(\"\\n day=d\",30);elseprintf(\"\\n day=d\",31);}}else{if(month=2)printf(\"\\n day=d\",28);else{if(month=4|month=6|month=9|month=11)printf(\"\\n day=d\",30);elseprintf(\"\\n day=d\",31);}}}只是把输入部分改了 输出结果是对的 还有你的32313133353236313431303231363533e58685e5aeb931333330356263判断闰年的方法有误应该是if(i%4=0&i%100。0|i%400=0)则i为闰年

计算某年某月有多少天 c语言(程序填空) len=31len=29len=28switch改成switch(mm)这里应该有个(mm)

用c语言 (c++) 统计某年某月某日是该年的第几天 用c语言(c++)统计某年某月某日是该年的第几天,c语言软件为计算机入门语言,简单,方便,易于操作。下面小编来讲讲怎样用c语言编写一个统计某年某月某日是该年的第几天,。

#c语言中计算某年某月有几天

随机阅读

qrcode
访问手机版