Write A C Program To Print A Calendar By Taking Input From User Using Loop Like Taking a Start Date From User
Logic :
In this problem we are taking number of days and start date as input start day are given below .
Monday -0
Tuesday -1
Wednesday -2
Thursday -3
Friday -4
Saturday -5
Sunday -6
Date Must Start With Given Days so we use a code 0 to 6 Monday to Sunday
Output:
C Program To Print a Calender with Start with Input Day
Enter Total Numbers Of Days in a Month :31
Enter First Day Start From <0-Mon . . . 5-Sat&6-Sun>End with Sunday :3
Mon Tue Wed Thu Fri Sat Sun
-----------------------------------------------------------------------------
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
need an explanation for this answer? contact us directly to get an explanation for this answer