Commit 339b27f6 by Gürcan Güleç

Modifying calendar.c so it looks better

parent ca1bf663
Showing with 0 additions and 6 deletions
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
int main() int main()
{ {
int date; int date;
int leap = 0; int leap = 0;
int m1[7] = {1, 3, 5, 7, 8, 10, 12}; int m1[7] = {1, 3, 5, 7, 8, 10, 12};
...@@ -58,10 +57,8 @@ int main() ...@@ -58,10 +57,8 @@ int main()
return 0; return 0;
} }
} }
} }
// deciding leap years // deciding leap years
if(year % 100 == 0) if(year % 100 == 0)
{ {
...@@ -90,7 +87,6 @@ int main() ...@@ -90,7 +87,6 @@ int main()
// checking february // checking february
if(month == 2) if(month == 2)
{ {
if(leap == 1) if(leap == 1)
{ {
if(day != 29) if(day != 29)
...@@ -106,9 +102,7 @@ int main() ...@@ -106,9 +102,7 @@ int main()
printf("Date not valid\n"); printf("Date not valid\n");
return 0; return 0;
} }
} }
} }
printf("Date is valid\n"); printf("Date is valid\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment