一下是输入日期(如:2008 5 22)计算第几天的程序帮我看一下哪里有错并改正谢谢。

日期:2022-04-04 21:07:44 人气:1

一下是输入日期(如:2008 5 22)计算第几天的程序帮我看一下哪里有错并改正谢谢。

c[12]=a[12];这里错了!
下面是我帮你修改的:
#include <stdio.h>
int putdays(int year,int month,int day)
{
char a[12]={31,29,31,30,31,30,31,31,30,31,30,31},
b[12]={31,28,31,30,31,30,31,
    A+
热门评论