标签:include 计算 3.0 stdio.h i++ ++ his scanf main
# include<stdio.h>
int main()
{
int a,b,i;
int sum = 0;
printf("Input your birth year:");
scanf("%d",&a);
printf("Input this year:");
scanf("%d",&b);
for(i=a;i<=b;i++)
{
if((i%4==0&&i%100!=0)||(i%400==0))
{
printf("%d\n",i);
sum++;
}
}
printf("count=%d\n",sum);
return 0;
}
标签:include 计算 3.0 stdio.h i++ ++ his scanf main
原文地址:https://www.cnblogs.com/zhkk/p/9689539.html