判断某一年是否为闰年的c语言程序 #include void main() { int year; printf("In
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/07/27 20:22:12
判断某一年是否为闰年的c语言程序 #include void main() { int year; printf("Input year:"); sc
![判断某一年是否为闰年的c语言程序 #include void main() { int year; printf(](/uploads/image/z/5349970-10-0.jpg?t=%E5%88%A4%E6%96%AD%E6%9F%90%E4%B8%80%E5%B9%B4%E6%98%AF%E5%90%A6%E4%B8%BA%E9%97%B0%E5%B9%B4%E7%9A%84c%E8%AF%AD%E8%A8%80%E7%A8%8B%E5%BA%8F+%23include+void+main%28%29+%7B+int+year%3B+printf%28%22In)
你的程序不完整,我写一段你看看吧
#include
void main()
{
int year;
printf("please input year :\n");
scanf("%d",&year);
if(year % 400 == 0 || year % 4 == 0 && year % 100 != 0)
{
printf("yes!\n");
}
else
printf("no!");
}
#include
void main()
{
int year;
printf("please input year :\n");
scanf("%d",&year);
if(year % 400 == 0 || year % 4 == 0 && year % 100 != 0)
{
printf("yes!\n");
}
else
printf("no!");
}