public class Fatorial{ public static int factorial(int x){ if(x<0)throw new IllgealAgumentException(""); int fact=1; if (int i=2;i<=x;i++) fact*=i; return fact; } }
public class Fatorial{ public static int factorial(int x){ if(x<0)throw new IllgealAgumentException(""); int fact=1; if (int i=2;i<=x;i++) fact*=i; return fact; } }