📄 datagen.cpp
字号:
#include<iostream>
#include<stdio.h>
using namespace std;
#define n 100
#define W 10000
#define P 10000
#define c 200000
int main()
{
int i,w,p;
freopen("input5.txt","w",stdout);
srand(5);
cout<<n<<" "<<c<<endl;
for(i=1;i<=n;i++)
{
w=rand()%W+1;
p=rand()%P+1;
cout<<w<<" "<<p<<endl;
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -