fork(1) download
  1. //@Author Damien Bell
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7.  
  8. int propertyTennants[5]; //
  9. int x = 10;
  10.  
  11. //propertyTennants[0] = 10;//Zero indexed. 0-4 [0][1][2][3][4]
  12.  
  13. for (int i=0; i < 5; i++){
  14. cin >> propertyTennants[i];//i= 0,1,2,3,4
  15. cout << propertyTennants[i]<<endl;
  16. }
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. return 0;
  24. }
  25.  
  26.  
  27. //An array (type of your choosing) that you fill with a for loop, and then output the data from it, at a later point in your program.
  28. //EC. If you make it so the array is filled by cin.
stdin
10
15
20
25
30
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:9: warning: unused variable ‘x’
stdout
10
15
20
25
30