📄 e22-03.cpp
字号:
// =======================================================
// Chapter 22, Example 3
// Using a seed with time
// =======================================================
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
void main()
{
srand( time(0) );
cout << "Random number: " << rand() << endl;
cout << "Press enter to continue..." << endl;
getchar();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -