程序91-100.docVIP

  • 2
  • 0
  • 约8.28千字
  • 约 10页
  • 2018-01-09 发布于河南
  • 举报
程序91-100

【程序91】 题目:时间函数举例1 1.程序分析: 2.程序源代码: #include stdio.h #include time.h void main() { time_t lt; /*define a longint time varible*/ lt=time(NULL);/*system time and date*/ printf(ctime()); /*english format output*/ printf(asctime(localtime()));/*tranfer to tm*/ printf(asctime(gmtime())); /*tranfer to Greenwich time*/ } ============================================================== 【程序92】 题目:时间函数举例2 1.程序分析:            2.程序源代码: /*calculate time*/ #include time.h #include stdio.h main() { time_t start,end; int i; start=time(NULL); for(i=0;i3000;i++) { printf(\1\1\1\1\1\1\1\1\1\1\n);} end=time(NULL); pr

文档评论(0)

1亿VIP精品文档

相关文档