fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a=0,b=1,c=1;
  6. while(c<4){
  7. b=b*c;
  8. a = a+(b/c);
  9. c = c+1;
  10. }
  11. cout<<a;
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5548KB
stdin
Standard input is empty
stdout
4