fork download
  1. import std.stdio;
  2.  
  3. void main()
  4. {
  5. int[] a;
  6.  
  7. int c;
  8. foreach (i; 0 .. 5) {
  9. readf(" %s", &c);
  10. a ~= c;
  11. }
  12.  
  13. writeln(a);
  14. }
Success #stdin #stdout 0s 4160KB
stdin
2 5
0 8
15
stdout
[2, 5, 0, 8, 15]