#include <conio.h>
/* 此头函数请不要删除 */
#include <stdio.h>
main()
{int year, y, y1=0, y2=0, y3=0, y4=0, y5=0;
for(year=1; year<=20; year++)
y1++;
for(year=4; year<=20; year++)
y2++;
for(year=8; year<=20; year++)
y3++;
for(year=12; year<=20; year++)
y4++;
for(year=16; year<=20; year++)
y5++;
y=y1+y2+y3+y4+y5+1;/*1是本来的母牛*/
printf("y=%d", y);
printf("y1=%d", y1);
printf("y2=%d", y2);
printf("y3=%d", y3);
printf("y4=%d", y4);
printf("y5=%d", y5);
}
大家看一下对不对?