Solving the Date Problems using functions in C. #11
champaksworldcreate
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Aims of the Program
### Functions to make
1.int isLeapYear(int year)
Function returns 1 if year is a leap year, 0 otherwise
2. int daysInMonths(int m,int y)
return no of days in the given month
3. int isValidDate(int d,int m,int y)
Return 0 if date is illegal, otherwise 1
4. int dateDifference(int d1,int m1,int y1, int d2,int m2, int y2)
Find the no of days between the two given dates. This is done under the assumption that D2>D1. Answer should be -ve if D2<D1
5. int weekDay(int d,int m,int y)
give the week day no. 0 for Sunday, 1-Monday,,,,6-Saturday
6. void weekDayName(int weekdayno)
Print the day name given the day no. 0-Sunday,1-Monday,,,6-Saturday
7. void monthCalendar(int month,int year)
Print the calendar of the given month and year
8. void yearCalendar(int year)
Print the calendar of the given year
Beta Was this translation helpful? Give feedback.
All reactions