summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2022-01-04 18:51:10 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2022-01-04 18:51:10 +0800
commit92508d66648bbb3602cf1cac34d0faf422f32829 (patch)
treec4673a8fd2f316713adb85d6842b1124a258666e
parentba79458b94b9ccb3bf93015c61189e53c8176f9c (diff)
downloadk&r-exercises-92508d66648bbb3602cf1cac34d0faf422f32829.tar.gz
5.8
-rw-r--r--5/8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/5/8.c b/5/8.c
index a1284d6..9d376b1 100644
--- a/5/8.c
+++ b/5/8.c
@@ -35,7 +35,7 @@ int day_of_year(int year, int month, int day) {
/* Sets month and day from day of year */
void month_day(int year, int yearday, int *pmonth, int *pday) {
int i, leap;
-
+
if (year < 0) {
*pmonth = *pday = 0;
printf("error: invalid year\n");