fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. constexpr size_t size = 3;
  6. int table[size];
  7. for(int &el: table){
  8. cin >> el;
  9. }
  10.  
  11. for(size_t i = 0; i < size; ++i){
  12. cout << "table[" << i << "]: " << table[i] << endl;
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 3416KB
stdin
1 3 5
stdout
table[0]: 1
table[1]: 3
table[2]: 5