返回首页

我想打印系统时间的C程序,不使用结构的概念。关闭,因为这篇文章是不是一个问题,或尚未在措辞的方式,允许将提供一个合理的答案。报告2011年9月12日,星期一,11:13。

回答

评论会员:Malli_S 时间:2012/02/05

#include <stdio.h>

#include <stdlib.h>

#include <time.h>



int main(void)

{

  time_t now;

  time(&now);

 

  printf("%s", ctime(&now));

 

  return 0;

}





#include <stdio.h>

#include <stdlib.h>

#include <time.h>



int main ()

{

  time_t seconds;

 

  seconds = time (NULL);

 

  //You can calculate your time from the seconds here.

  

  return 0;

}
评论会员:游客 时间:2012/02/05
B风格="颜色:#3399ffThatsAlok:采取{A}看看]这个头文件包含函数的定义,获取和处理日期和时间信息。在这里你会得到关于时间的函数将用于获取当前时间。。采取一看{A2}],以了解如何使用功能
RaviRanjankr:如果您正在运行的DOS,你可以使用中断(...) 是在网络上有大量的文档中提供。而DOS / BIOS中断调用,以获得系统时间
评论会员:游客 时间:2012/02/05
|RDSchaefer:有许多方法。选择适合你的。{A3的}codeprelang="cs"spanclass="code-keyword"if/span(PreviousPage!=spanclass="code-keyword"null/span){TextBoxSourceTextBox=(TextBox)PreviousPage.FindControl(spanclass="code-string""/spanspanclass="code-string"TextBox1"/span);spanclass="code-keyword"if/span(SourceTextBox!=spanclass="code-keyword"null/span){Label1.Text=SourceTextBox.Text;}}/pre/code使用上一页所示,或QueryString