assignment6-1-1.cpp
来自「This is solution code c++ in class lesso」· C++ 代码 · 共 18 行
CPP
18 行
#include<iostream>
#include<fstream>
#include<cstdlib>
#include<ctime>
using namespace std;
int main()
{
srand((unsigned int) time(0));
ofstream fout("data.txt");
for (int i=0;i<30;i++)
{
fout << (rand() % 100) + 1 << endl;
}
fout.close();
system("pause");
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?