15 lines
289 B
C
15 lines
289 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <time.h>
|
|
int main(void){
|
|
time_t temps= time(NULL);
|
|
struct tm* date = localtime(&temps);
|
|
printf("%d", date->tm_year+1900);
|
|
printf("-");
|
|
printf("%d", date->tm_mon+1);
|
|
printf("-");
|
|
printf("%d\n", date->tm_mday);
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|