fork download
  1. #include <iostream>
  2.  
  3. int multiply_by_two(int v)
  4. {
  5. return v * 2;
  6. }
  7. void print_hello_world()
  8. {
  9. std::cout << "Hello, World!" << std::endl;
  10. }
  11.  
  12. int main()
  13. {
  14. print_hello_world();
  15.  
  16. std::cout << "The meaning of life is " << multiply_by_two(21) << std::endl;
  17. }
  18.  
Success #stdin #stdout 0s 3344KB
stdin
Standard input is empty
stdout
Hello, World!
The meaning of life is 42