fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int A[10];
  5.  
  6. int main() {
  7.  
  8. A[0]=5;
  9. A[1]=15;
  10. A[2]=25;
  11. A[3]=35;
  12. A[4]=45;
  13. A[5]=55;
  14. A[6]=65;
  15. A[7]=75;
  16. A[8]=85;
  17. A[9]=95;
  18.  
  19. for(int i=0; i<10; i++)
  20. cout<<A[i]<<"\t";
  21.  
  22. cout<<endl;
  23. //stampa dall'ultimo elemento al primo
  24. for (int i=9; i>=0; i--)
  25. cout<<A[i]<<"\t";
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 5244KB
stdin
Standard input is empty
stdout
5	15	25	35	45	55	65	75	85	95	
95	85	75	65	55	45	35	25	15	5