#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;
}