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
|
// date3.c
from std use calendar, console;
void main()
{
const string mois[12] = {"Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
"Juillet", "Aout", "Septembre", "Octobre", "Novembre",
"Decembre"};
const string jours_semaine[7] = {"Lundi", "Mardi", "Mercredi", "Jeudi",
"Vendredi", "Samedi", "Dimanche"};
DATE_TIME now;
int jour;
get_datetime (out now);
for (jour=1; jour<=max_days_in_month (now.month, now.year); jour++)
{
printf ("%9s : Le %2d %s %d\n",
jours_semaine[day_of_week (jour,now.month, now.year)-1],
jour,
mois[now.month-1],
now.year);
}
} |
Partager