//利用srand()函数实现功能
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int seed,m=0,i=1,n;
while(i>0)
{
cout<<"请输入任意一个数:";
cin>>seed;//seed为种子,只有每次输入不同的seed,随机数才会不同
n=seed+m+12;
srand(n);
m=rand();
cout<<m<<endl;
}
}