![]() |
#2
jackie19182009-07-20 17:36
|

#include <ctime>
#include <iostream>
using namespace std;
int main()
{
int i;
int rd;
srand(time(NULL));
rd = rand()%10;
cout << rd <<endl;
system("pause");
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int i;
int rd;
srand(time(NULL));
rd = rand()%10;
cout << rd <<endl;
system("pause");
return 0;
}
帮忙解释一下代码,越详细越好。