DEV/DEV1.1/TP12:Structures/date.c
2022-11-16 15:31:49 +01:00

10 lines
226 B
C

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
time_t ts=time(NULL);
struct tm* date = localtime (&ts);
printf("Nous sommes le %d/%d/%d.\n",date->tm_year+1900,date->tm_mon,date->tm_hour);
return 0;
}