English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1 answers

Here is the simple way to go about doing it:

#include

int main()
{
int i, y1, y2;

printf("Enter the first year: ");
scanf("%d", &y1);
printf("Enter the second year: ");
scanf("%d", &y2);

printf("Leap years between %d and %d:\n", y1, y2);
for(i = y1; i <= y2; ++i)
if(i % 4 == 0)
printf("%d ", i);
printf("\n");
return 0;
}

Good night!

2007-11-11 19:29:22 · answer #1 · answered by anonymous 7 · 0 0

fedest.com, questions and answers