C语言基础:输出当前日期和时间
#include <stdio.h> #include <time.h> int main (void) { time_t current_time; time(¤t_time); // Get the time in seconds; printf("The current date and time: %s", ctime(¤t_time)); return 1; }
C语言基础:输出当前日期和时间
#include <stdio.h> #include <time.h> int main (void) { time_t current_time; time(¤t_time); // Get the time in seconds; printf("The current date and time: %s", ctime(¤t_time)); return 1; }