CCALDR.TXT

(1 KB) Pobierz
/* calendar.c */
/* print monthly calendar */

#include <stdio.h>

#define CLS       147
#define VERTLINE  124
#define PRINTCHN  5

/* printer constants below */

#define FF        12
#define EXPAND    14
#define NORMAL    15

main ()
al);
  printcal (month,fullyear,cal);
(wkday,numdays,cal)
unsigned wkday, numdays, cal[][6];



PRINTCHN,"%s\n",horzline);

  for (row = 0; row < 6; row++)
    oldepth < 5; coldepth++)
       out: reference number
 *      (# days past reference date)
 * ====================================
 */

dayno (month, day, year)
int month, day, year;

5;
         if ((i % 4) == 0)
            days ++;
       number (1-12)     
 * out: pointer to name of month 
 * ====================================
 */

monthname (monthno)
unsigned monthno;

a month
 * ------------------------------------
 * in:  month, year                 
 * out: number of days in that month 
 * ====================================
 */

nodays (month, year)
unsigned month, year;


 * calculate day of week for date 
 * ------------------------------------
 * in:  month, day, year 
 * out: day of week (0=Sun ... 6=Sat) 
 * ====================================
 */

weekday (month, day, year)
unsigned month, day, year;

ay %= 7;
   wkday += refwkday;

   if (wkday > 6)
      wkday -= 7;

   return (wkday);
Zgłoś jeśli naruszono regulamin