#include <iostream.h>
#include <windows.h>
//using namespace std;
void main()
{
int a;
SYSTEMTIME syst;
GetLocalTime(&syst);
cin>>a;
if(a>5)cout<<syst.wYear<<"年"<<syst.wMonth<<"月"<<syst.wDay
<<"日"<<syst.wHour<<":"<<syst.wMinute<<":"<<syst.wSecond
<<":"<<syst.wMilliseconds<<":"<<syst.wDayOfWeek<<endl;
}
#include <windows.h>
//using namespace std;
void main()
{
int a;
SYSTEMTIME syst;
GetLocalTime(&syst);
cin>>a;
if(a>5)cout<<syst.wYear<<"年"<<syst.wMonth<<"月"<<syst.wDay
<<"日"<<syst.wHour<<":"<<syst.wMinute<<":"<<syst.wSecond
<<":"<<syst.wMilliseconds<<":"<<syst.wDayOfWeek<<endl;
}
本文介绍了一个简单的C++程序,该程序使用Windows API来获取当前的系统时间,并根据输入的整数条件输出详细的时间信息,包括年、月、日、小时、分钟、秒、毫秒及星期几。
547

被折叠的 条评论
为什么被折叠?



