C 语言程序,假定 订单号 int order=1234;生成新订单号含日期时间:#include #include int main( ){time_t t;int order,i;char s[80];order = 1234;time(&t);sprintf(s,"%s_%05d",ctime (&t),order);for (i=0;iprintf("%s\n",s);return 0;} 输出例子: Fri_Feb_17_14:59:24_2017__01234