Hey guys just wondering if someone can check my program out iv attached the files its the cal.c program. Im trying to print the days in a month if its 31 days in that month i want it to print the sequence from 1 2 3 4 etc etc to 31

eg if you type cal 1 2006 in unix

January

1 2 3 4 5 6 7
8 9 10 11 12
etc etc

how can i go through the 31 days then print them for each month