随机数
来源:互联网 发布:linux异常关机日志 编辑:程序博客网 时间:2024/03/28 22:19
#include <iostream>
#include <vector>
#include <algorithm>
#include <ctime>
template <class T>
struct display
{
void operator()(const T valude){std:cout<<value<<'';}
};
inline int Random(int min,int max)
{
return((rand()%(max+1-min))+min);
}
int main()
{
typedef std::vector<int> IntArray;
IntArray myarray;
srand((unsigned int)time(NULL));
for(itn i=0;i<10;++i)
{
myarray.push_back(Random(10,60));
for_each(myarray.begin(),myarray.end(),display<int>());
return 0;
}
#include <vector>
#include <algorithm>
#include <ctime>
template <class T>
struct display
{
void operator()(const T valude){std:cout<<value<<'';}
};
inline int Random(int min,int max)
{
return((rand()%(max+1-min))+min);
}
int main()
{
typedef std::vector<int> IntArray;
IntArray myarray;
srand((unsigned int)time(NULL));
for(itn i=0;i<10;++i)
{
myarray.push_back(Random(10,60));
for_each(myarray.begin(),myarray.end(),display<int>());
return 0;
}
- 随机数
- 随机数
- 随机数。。。
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 读 Access mdb 文件 DataSet 和 DataGrid 显示
- 在VB中制作VC中具有PUSHLIKE风格的复选框
- 在VB中动态添加弹出菜单
- Struts的心酸往事
- SetMenu的简单示例
- 随机数
- 智能客户端(SmartClient)
- CSDN上的解决问题贴
- Visual Studio .Net团队开发
- 视频采集类
- Maxthon正式版试用手记(正式版发布在即)
- 新浪任你邮收费信箱增容,最高到2G!
- [ZT] 通向"Longhorn"之路 2004(全文)
- Windows SP2窗口拦截器阻碍Windows Update的解决方法