@diagon
Higher
1936 / 1202 / 49
Регистрация: 02.05.2010
Сообщений: 2,925
|
19.05.2012, 18:32
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
| #include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
int main()
{
const int n = 15;
std::vector< int > arr(n);
std::iota( arr.rbegin(), arr.rend(), 1 );
std::copy( arr.begin(), arr.end(), std::ostream_iterator< int > (std::cout, " ") );
} |
|
http://liveworkspace.org/code/61cc177bf99e0c805003e2b39162b608
0
|