请补充fun函数,该函数的功能是:判断一个年份是否为闰年.
例如,1900年不是闰年,2004是闰年.
注意:部分源程序给出如下,请勿改动主函数main中的任何内容,仅在fun函数的横线上填如所编写的若干表达式或语句。
#include <stdio.h>
int fun(int n)
{ int flag = 0;
if (n%4 == 0)
/**********found**********/
if (___(1)___)
flag = 1;
/**********found**********/
if (___(2)___)
flag = 1;
/**********found**********/
return ___(3)___;
}
void main()
{ int year;
printf("Input the year:");
scanf("%d", &year);
if (fun(year))
printf("%d is a leap year.\n", year);
else
printf("%d is not a leap year.\n", year);
}
以下是判断年份是闰年的fun函数补充完整的代码,如下:
#include <stdio.h>网页链接 解答
追答?
追问这个链接的帮忙解答一下 也是一道题
本回答被提问者和网友采纳