public class FindFactorial { public static void fact(Integer num){ Long answer = 0; while(num != 0){ answer = answer * num; num--; } system.debug(answer); } }
Standard input is empty
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)
./prog:3: parse error, expected '}' ./prog:7: expected expression