DEV/BUT1/DEV1.1/Structures/1.c

11 lines
261 B
C
Raw Normal View History

2024-02-01 13:55:03 +01:00
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void){
time_t timestamp = time(NULL);
struct tm * timeInfos = localtime(&timestamp);
printf( "%04d/%02d/%02d\n",timeInfos->tm_year+1900, timeInfos->tm_mon+1, timeInfos->tm_mday);
}