fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. string args[] = {"This", "is", "a", "beautiful", "world"};
  7. string s, sep;
  8. for(int i = 0; i < sizeof(args)/sizeof(string); i++) {
  9. s += sep + args[i];
  10. sep = " ";
  11. }
  12.  
  13. cout << s << endl;
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
This is a beautiful world