The normal approach would be to throw an exception at this point. So your code would look like:
public int computeFac(int input) {
if (input < 0) {
throw new IllegalArgumentException("Negative numbers are not allowed");
}
for ( a = 1 ; a <= input ; a++ ) {
result = result*a;
}
return result;
}
Also, note, that it's a good idea to always use braces for loops and conditionals, even if they only have one line.