fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main() {
  6. int a[10];
  7. fill(a, a + 5, 3);
  8. for (int i=0; i<5; i++) cout << a[i] << " ";
  9. cout << endl;
  10. }
Success #stdin #stdout 0s 4332KB
stdin
Standard input is empty
stdout
3 3 3 3 3