Explore Connect Documentation
Snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
using namespace std;
int main() {
  int an_array[10];
  int i = 0;
  
  for (auto &element : an_array) {
    element = i;
    ++i;
  }
  
  for (auto &element : an_array) {
    cout << element << ' ';
  }
  cout << endl;
  
  return 0;
}
Press desired key combination and then press ENTER.