add something

master
1282855823@qq.com 6 years ago
parent 7d7599f027
commit f663c516e3

@ -0,0 +1,13 @@
#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+2, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec);
if(lt->tm_mon+1>0&&lt->tm_mon+1<5)
printf("\n夜深了,该睡了");
return 0;
}

Binary file not shown.
Loading…
Cancel
Save