fork download
  1. fact<-function(n)
  2. {
  3. if(n==1)
  4. {
  5. return(1)
  6. }
  7. else
  8. {
  9. return(n*fact(n-1)
  10. }
  11. }
  12. fact(4)
  13.  
Success #stdin #stdout #stderr 0.21s 39160KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: unexpected '}' in:
"                return(n*fact(n-1)
        }"
Execution halted