#include <stdio.h>
#include <time.h>
int main()
{
time_t t;
struct tm* lt;
time (&t);
lt = localtime(&t);
printf("%d/%d/%d %d:%d:%d\n",lt->tm_year+1900,
lt->tm_mon+1,lt->tm_mday,lt->tm_hour,
lt->tm_min,lt->tm_sec);
return 0;
}
#include <stdio.h>
#include <time.h>
int main()
{
time_t t;
struct tm* lt;
time (&t);
lt = localtime(&t);
printf("%d/%d/%d %d:%d:%d\n",lt->tm_year+1900,
lt->tm_mon+1,lt->tm_mday,lt->tm_hour,
lt->tm_min,lt->tm_sec);
return 0;
}