fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<math.h>
  4. int main(){
  5. float S=2,b=1;
  6. int i,j;
  7. for(i=2;i<10;i++){
  8. for(j=i;j>=2;j--){
  9. b=b*j;
  10. }
  11. S=(float)S+(float)1/b;
  12. b=1;
  13. }
  14. printf("%f",S);
  15. system("pause");
  16. return 0;
  17. }
Success #stdin #stdout #stderr 0s 4540KB
stdin
Standard input is empty
stdout
2.718282
stderr
sh: 1: pause: not found