fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. cout<<"hello world";
  7. int n=6;
  8. int f = 1;
  9. cout<<endl<<"factorial 6 is: ";
  10. while (n != 0)
  11. {
  12. f *= n;
  13. n -= 1;
  14. }
  15. cout<<f<<endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 16048KB
stdin
Standard input is empty
stdout
hello world
factorial 6 is: 720