fork download
  1. public class FindFactorial {
  2.  
  3. public static void fact(Integer num){
  4.  
  5. Long answer = 0;
  6.  
  7. while(num != 0){
  8.  
  9. answer = answer * num;
  10.  
  11. num--;
  12.  
  13. }
  14.  
  15. system.debug(answer);
  16.  
  17. }
  18.  
  19. }
Success #stdin #stdout #stderr 0.01s 8892KB
stdin
Standard input is empty
stdout
Object: UndefinedObject error: did not understand #FindFactorial
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
UndefinedObject class(Object)>>doesNotUnderstand: #FindFactorial (SysExcept.st:1448)
UndefinedObject>>executeStatements (prog:1)
stderr
./prog:3: parse error, expected '}'
./prog:7: expected expression