fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int length;
  6. scanf("%d ", &length); // You used & properly here!
  7. int array[length];
  8.  
  9. for(int i=0; i<length; i++) // Loop: for(int i=0; i<length; ++i)
  10. {
  11. scanf("%d ", &array[i]); // Why didn't you use & here???
  12. }
  13.  
  14. for(int j=0; j<length; j++) // Loop: for(int j=0; j<length; ++j)
  15. {
  16. printf("%d\n", array[j]);
  17. }
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 2160KB
stdin
10 1 2 3 4 5 6 7 8 9 10
stdout
1
2
3
4
5
6
7
8
9
10