运行 ❯
获取您
自己的
网站
×
更改方向
更改主题,深色/浅色
转到 Spaces
#include <iostream> #include <ctime> // Import the ctime library using namespace std; int main () { // Get the timestamp for the current date and time time_t timestamp; time(×tamp); // Display the date and time represented by the timestamp cout << ctime(×tamp); return 0; } // Note: This example displays the server's local time, which may differ from your local time.