fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. const int n = 5;
  7. int tab[n] = {1,2,3,4,5};
  8.  
  9. if(n>=1)
  10. cout<<tab[0];
  11. for(int i=1; i<n; i++)
  12. cout<<", "<<tab[i];
  13. return 0;
  14. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
1, 2, 3, 4, 5