Данный отчёт сгенерирован 04.04.2023 06:21:13 UTC.
HTML версия (этот сайт) сгенерирован 04.04.2023 06:21:31 UTC.
Коммит: [bfeb65b9] add automatic zip creation 04.04.2023 06:21:13
HTML версия (этот сайт) сгенерирован 04.04.2023 06:21:31 UTC.
Коммит: [bfeb65b9] add automatic zip creation 04.04.2023 06:21:13
Задача: Факторіал
04.04.2023 06:21:13
Описание: Оголосити статичний метод Fact, який отримує невід'ємне ціле число та повертає факторіал цього числа.
Врахувати, що 0! = 1.
04.04.2023 06:21:13
Решений: 116
04.04.2023 06:21:13
Факторіал
04.04.2023 06:21:13
static int Fact( int numb){
if(numb == 0){
return 1;
}
return numb * Fact(numb-1);
}
static int Fact(int f){
if (f == 0){
return 1;
}
int answ = 1;
while(f!=0){
answ *= f;
f--;
}
return answ;
}
static int Fact (int n) {
int fact = 1;
for (int i = 1; i <= n; i++) {
fact *= i;
}
return fact;
}
static int Fact(int n)
{
int answer = 1;
if (n == 0)
{
return answer;
}
else
{
while (n > 0)
{
answer *= n;
n--;
}
return answer;
}
}
static int Fact (int y){
int res = 1;
for (int i = 1; i <= y; i++){
res = i * res;
}
if (y == 0){
return 1;
}
return res;
}
static int Fact(int n)
{
if (n == 0)
return 1;
else
return n * Fact(n - 1);
}
static int Fact(int n){
int res = 1;
for(int i = 1; i <= n; i++ ){
res *= i;
}
return res;
}
public static int Fact(int n)
{
if (n < 0)
{
}
int result = 1;
for (int i = 1; i <= n; i++)
{
result *= i;
}
return result;
}
static int Fact(int v)
{
int fact=1;
for (int i=1; i<=v; i++){
fact*=i;
}
return fact;
}
static int Fact(int x){
if(x == 0){
return 1;
}
else{
return x * Fact(x - 1);
}
}
static int Fact(int n){
if (n == 0)
return 1;
int sum = 1;
for (int i = 1; i <= n; i++){
sum *= i;
}
return sum;
}
static int Fact(int num){
int res = 1;
for(int i = 2; i < num + 1; i++){
res *= i;
}
return res;
}
static int Fact( int x, int f = 1 )
{
if (x == 0)
{
return 1;
}
for (int i = 1; i <= x; i++)
{
f *= i;
}
return f;
}
static int Fact(int b){
if(b == 0) return 1;
int res = 1;
for(int i = 0; i< b; i++){
res*=i;
}
return res;
}
static int Fact(int a)
{
int fac=1;
for(int i=1;i< a;i++)
{
fac*=i;
}
return fac;
}
static int Fact (int n) {
int fact = 1;
if (n == 0) {
return 1;
}
else {
for (int i = 1; i <= n; i++) {
fact = fact * i;
}
return fact;
}
}
static int Fact(int number) {
int factorial = 1;
for (int i = 2; i <= number; i++) factorial *= i;
return factorial;
}
static int Fact(int number){
int total = 1;
if(number< 0){
return (--total);
} else if(number==0){
return total;
} else if(number==1){
return total;
} else if(number>0){
for(int i=1; i<=number; i++){
total *= i;
}
return total;
}
return total;
}
static int Fact(int n){
if(n==0) return 1;
return Fact(n-1);
}
static int Fact (int a) {
if (a == 0) { return 1; }
else {
int fact = 1;
for (int i = 1; i <= a; i++) {
fact *= i;
}
return fact;
}
}
static int Fact(int x){
for(int i = x - 1;i < 0;--i){
if(i > 0){
x = x * i;
}
if(i == 0){
x = 1;;
}
if(i < 0){
break;
}
}
return x;
}
static int Fact(int a){
if (a == 0) return 1;
return a*Fact(a-1);
}
public static int Fact(int x)
{
int result = 1;
for (int i = 2; i <= x; i++)
{
result *= i;
}
return result;
}
static int Fact (int x){
if (x == 0){
return 1;
}
int f = 1;
while (x > 0){
f *= x;
x--;
}
return f;
}
public static int Fact(int n)
{
if (n < 0)
{
return -1; // Повертаємо -1 як помилку, якщо n менше 0.
}
int result = 1;
for (int i = 2; i <= n; i++)
{
result *= i;
}
return result;
}
static int Fact(int n){
if(n==0){
return 1;
}
else{
return n*Fact(n-1);
}
}
static int Fact(int num)
{
int answer = num;
if (num == 0){
return 1;
}
else{
return (answer + Fact(num-1));
}
}
static int Fact(int n) {
if (n == 0) {
return 1;
}
else {
return n * Fact(n - 1);
}
}
static int Fact(int number)
{
int result = 1;
while(number>0)
{
result*=number;
number--;
}
return result;
}
static int Fact(uint num)
{
int factNum = 1;
if (num == 0)
{
return 1;
}
for (int i = 1; i <= num; i++)
{
factNum *= i;
}
return factNum;
}
static int Fact(int n){
if(n<=2){
return 1;
}
return n*Fact(n-1);
}
static int Fact(int num) {
if (num==0||num==1) return 1;
return num*Fact(num-1);
}
static int Fact(int a){
if(a == 0){
return 1;
} else {
return Fact(a - 1);
}
}
static int Fact(int n){
if(n == 0)
{return 1;}
else
{return n*Fact(n-1);}
}
static int Fact(int n)
{
if(n == 0)
return 1;
int result = 1;
for(int i = 1; i <= n; i++)
{
result *= i;
}
return result;
}
static int Fact(int n)
{
if(n==1||n==0){return 1;}
return n*Fact(n-1);
}
static int Fact (int num){
int fact = 1;
for (int i = 2; i < num; i++){
fact *= i;
}
return fact;
}
static int Fact(int n)
{
int result = 1;
for (int i = 1; i <= n; i++)
{
result *= i;
}
return result;
}
static int Fact(int f){
int a = 1;
if (f == 0)
{
a = 1;
}
else
{
a = 1;
int i = 2;
while(i <= f) {
a *= i;
i += 1;
}
}
return a;
}
static int Fact(int a) {
if (a == 0) return 0;
return a * (a == 1 ? 1 : Fact(a - 1));
}
static int Fact(int number)
{
if (number <= 0)
{
return 1;
}
else
{
return number *= Fact(number - 1);
}
}
static int Fact(int x){
for (int i = x - 1; i > 0; i--)
{
x *= i;
}
return x;
}
static int Fact(int x) {
if (x == 0) {
return 1;
}
else {
return x * Fact(x - 1);
}
}
static int Fact(int n){
if(n == 0){
return 1;
}
else{
return n*Fact(n-1);
}
}
static int Fact(int n)
{
if (n == 0) return 1;
return n * Fact(n - 1);
}
static int Fact(int n) => n <= 1 ? 1 : n * Fact(n - 1);
static int Fact (int n)
{
if (n >= 0)
{
int nFact = 1;
for (int i = n; i > 0; i--)
{
nFact *= i;
}
return nFact;
}
else
return 0;
}
static int Fact(int n)
{
int a = 1;
for(int i = 1; i <= n; i++)
{
a *= i;
}
return a;
}
static int Fact(int number)
{
if (number == 0)
{
return 1;
}
return number * Fact(number - 1);
}
static int Fact (int x) {
if (x == 0)
return 1;
int res = 1;
for (int i = x; i >= 1; i--) {
res *= i;
}
return res;
}
static int Fact(int num) {
int result = 0;
for (int i = num; i > 1; i--){
result *=i;
}
return result;
}
static int Fact(int x)
{
int fact = 1;
for (int i = 1; i <= x; i++)
{
x *= i;
}
return fact;
}
static int Fact(int n)
{
if (n == 0)
return 1;
else
return n * Fact(n - 1);
}
static int Fact(int x) {
int result = 1;
for(int i = 1; i <= x; i++){
result *= i;
}
return result;
}
static int Fact (int n) {
if (n == 1)
return n;
else if (n <= 0)
return 1;
else
return n * Fact(n - 1);
}
//Fact(x);
static int Fact (uint x)
{
//int i = 0;
for(uint i=1; i<=x; i++) {
x *= i;
}
int t = Convert.ToInt32(x);
return t;
}
static int Fact(int x){
if(x == 0){
return 0;
}
int res = 1;
for(int i = 1; i < x; i++){
res *= i;
}
return res;
}
static int Fact(int n){
int i,fact=1;
for(i=1;i<=n;i++){
fact=fact*i;
}
return fact;
}
static int Fact(int num)
{
if(num==0||num==1)
{
return 1;
}
else
{
return num * Fact(num-1);
}
}
static int Fact(int n) {
int f = 1;
for(int i = 1; i <= n; i++) {
f *= i;
}
return f;
}
static int Fact(int x){
for(int i = 2; i <= x; i++){
x*=i;
}
return x;
}
static int Fact(int n){
if (n == 0){
return 1;
}
else {
return n*Fact(n-1);
}
}
static int Fact(int chislo){
int tipo;
int fact = 1;
for(int i = 0;i <= chislo; i++){
if(i == 0){
tipo = 1;
}
tipo = i;
fact *= tipo;
}
return fact;
}
static int Fact(int n){
if(n == 0) return 1;
if (n == 1) return 1;
return n * Fact(n - 1);
}
static int Fact(int num){
if(num == 0){
return 1;
}
else{
return num * Fact(num-1);
}
}
static int Fact(byte x)
{
if (x == 0)
{
return 1;
}
int f = 1;
for (int i = 1; i <= x; i++)
{
f *= i;
}
return f;
}
static int Fact(int n=1){
int res = 1;
if(n == 0){
return res;
}
for(int i = 2; i <= n; i++){
res *= i;
}
return res;
}
static int Fact(int n)
{
if (n == 0)
{
return 1;
}
else
{
int fact = 1;
for (int i = 1; i <= n; i++)
{
fact *= i;
}
return fact;
}
}
static int Fact(int n){
if(n == 0){
return 1;
}
else{
return n * Fact(n - 1);
}
}
static int Fact (int n) => n==0? 1 : n*Fact(n-1);
static int Fact (int n) {
int res = 1;
for(int i = 1; i<=n; i++, res*=i);
return res;
}
public static int Fact(int n)
{
if (n == 0)
{
return 1;
}
int result = 1;
for (int i = 1; i <= n; i++)
{
result *= i;
}
return result;
}
static int Fact(int num) {
if(num == 0) {
return 1;
} else {
return num * Fact(num - 1);
}
}
static int Fact(int num){
int fact = 1;
for (int i=1; i<=num; i++){
fact*=i;
}
return fact;
}
static int Fact(int n)
{
if(n == 0 && n == 1) return 1;
int sum = 1;
for(int i = 0; i < n; i++) sum *= i;
return sum;
}
static int Fact(int x){
int i = 1;
do {i=i * (i + 1); }
while (i <= x);
return i;
}
static int Fact(int n)
{
int res = 1;
for (int i = 1; i <= n; i++)
{
res *= i;
}
return res;
}
static int Fact (int n) {
int num = 1;
if (n < 2)
return num;
for (int i = 2; i <= n; ++i) {
num *= i;
}
return num;
}
static int Fact (int num) {
if (num == 0 || num == 1) return 1;
return num * Fact(num - 1);
}
static int Fact(int n){
if(n == 0){
return 1;
}
else{ return n*Fact(n-1);
}
}
static int Fact(int n)
{
int answer = 1;
for (int i = 1; i <= n; i++)
{
answer *= i;
}
return answer;
}
static int Fact(int num)
{
if(num == 0) return 1;
int result = 1;
while(num > 0){
result *= num;
num --;
}
return result;
}
static int Fact(int a){
int fact = 1;
if(a == 0){
fact = 1;
}
else{
for(int i = 1; i <= a; i++){
fact *= i;
}
}
return fact;
}
static int Fact (int number){
if(number <= 0){
return 1;
}
else{
return number*Fact(number-1);
}
}
static int Fact(int a)
{
int result = 1;
for(int i = 1; i <= a; i++)
{
result *= i;
}
return result;
}
static int Fact(int n){
if(n == 0) return 1;
else return Fact(n - 1) * n;
}
static int Fact(int a){
if(a==1 || a==0) return 1;
return a* Fact (a-1);
}
static int Fact (int x){
if (x == 1 || x == 0){
return 1;
}
else {
return x * Fact(x - 1);
}
}
static int Fact(int n){
if(n == 0){
return 1;
}
int fact = 1;
for(int i = 1; i < n; i++){
fact *= i;
}
return fact;
}
static int Fact(int n)
{
if (n == 0)
{
return 1;
}
int result = 1;
for (int i = 1 ; i <= n;i++)
{
result = result * i ;
}
return result;
}
static int Fact ( int i){
int n = 1;
if ( i == 0 ){
return 1;
}
else{
while ( i != 1 ){
n *= n++;
i--;
}
}
return n;
}
static int Fact(int n) {
int a = 1;
for(int i = 1; i<=n; i++) a *= i;
return a;
}
static int Fact(uint number){
int result = 1;
if(number == 0){
return 1;
}
for(byte i = 0;i < number;i++){
result *= i;
}
return result;
}
static int Fact(int n)
{
int res = 1;
for (int i = 2; i <= n; i++) {
res *= i;
}
return res;
}
static int Fact(int number)
{
int res = 1;
if(number == 0)
{
return 1;
}
for(int i = 0; i <= number; i++)
{
res *= i;
}
return res;
}
static int Fact ( int n ){
if ( n == 0 )
return 1;
else
for (int i = 1; i <= n; i++){
n *= i;
}
return n;
}
static int Fact(int n){
if(n==0) return 1;
int sum =1;
for(int i = 1; i<=n; i++){
sum*=i;
}
return sum;
}
static int Fact(int n)
{
int res= 1;
for (int i = 1; i <= n; i++){
res*=i;
}
return res;
}
static int Fact(int x){
int fact = 1;
for (int i = 1; i <= x; i++){
fact *= i;
}
return fact;
}
static int Fact(int n)
{
if (n == 0) return 1;
return n * Fact(n - 1);
}
static int Fact(int x)
{
int n = 1;
while(x > 1)
{
n *= x;
x--;
}
return n;
}
static int Fact(int n)
{
return n == 1 || n == 0 ? 1 : n * Fact(n - 1);
}
static int Fact(int x)
{
int result = 1;
for (int i = x; i > 0; i--)
result *= i;
return result;
}
static int Fact(int n){
if(n==0){
return 1;
}
else{
return n*Fact(n-1);
}
}
static int Fact(int x) {
if(x <= 1) return 1;
return x * Fact(x-1);
}
static int Fact(int n)
{
int res = 1;
for (int i = 1; i <= n; i++)
{
res *= i;
}
return res;
}
static int Fact(int a, int b=1)
{
if(a==0)
{return 1;}
else
for(int i=1;i< a+1;i++){
b*=i;
}
return b;
}
static int Fact(int x){
int a = 1;
for(int i = 1; i<=x; i++){
a= a*i;
}
return a;
}
static int Fact(int num)
{
int res = 1;
for(int i = 1; i < num; i++) res *= i;
return res;
}
static int Fact(int n){
var result = 1;
while(n > 0){
result *= n--;
}
return result;
}
static int Fact(int n)
{
int fact = 1;
for(int i =1;i<=n;i++) fact*=i;
return fact;
}
static int Fact(int n, int res = 1){
for (int num1 = 1; num1 < n +1; num1++)
{
res = res*num1;
}
return res;
}
static int Fact(int n){
if(n==0){
return 1;
}else{
return n*Fact(n-1);
}
}
static int Fact(int num){
if (num>0){
return num * Fact(num - 1);
}
else{
return 1;
}
}
static int Fact(int num)
{
int count = 1;
if (num == 0) return 1;
else
{
while(num != 1)
{
count *= num;
num -= 1;
}
return count;
}
}
static int Fact(int x){
if(x==0){
return 1;
}
else{
return x*Fact(x-1);
}
}
if(numb == 0){
return 1;
}
return numb * Fact(numb-1);
}
if (f == 0){
return 1;
}
int answ = 1;
while(f!=0){
answ *= f;
f--;
}
return answ;
}
int fact = 1;
for (int i = 1; i <= n; i++) {
fact *= i;
}
return fact;
}
{
int answer = 1;
if (n == 0)
{
return answer;
}
else
{
while (n > 0)
{
answer *= n;
n--;
}
return answer;
}
}
int res = 1;
for (int i = 1; i <= y; i++){
res = i * res;
}
if (y == 0){
return 1;
}
return res;
}
{
if (n == 0)
return 1;
else
return n * Fact(n - 1);
}
int res = 1;
for(int i = 1; i <= n; i++ ){
res *= i;
}
return res;
}
{
if (n < 0)
{
}
int result = 1;
for (int i = 1; i <= n; i++)
{
result *= i;
}
return result;
}
{
int fact=1;
for (int i=1; i<=v; i++){
fact*=i;
}
return fact;
}
if(x == 0){
return 1;
}
else{
return x * Fact(x - 1);
}
}
if (n == 0)
return 1;
int sum = 1;
for (int i = 1; i <= n; i++){
sum *= i;
}
return sum;
}
int res = 1;
for(int i = 2; i < num + 1; i++){
res *= i;
}
return res;
}
{
if (x == 0)
{
return 1;
}
for (int i = 1; i <= x; i++)
{
f *= i;
}
return f;
}
if(b == 0) return 1;
int res = 1;
for(int i = 0; i< b; i++){
res*=i;
}
return res;
}
{
int fac=1;
for(int i=1;i< a;i++)
{
fac*=i;
}
return fac;
}
int fact = 1;
if (n == 0) {
return 1;
}
else {
for (int i = 1; i <= n; i++) {
fact = fact * i;
}
return fact;
}
}
int factorial = 1;
for (int i = 2; i <= number; i++) factorial *= i;
return factorial;
}
int total = 1;
if(number< 0){
return (--total);
} else if(number==0){
return total;
} else if(number==1){
return total;
} else if(number>0){
for(int i=1; i<=number; i++){
total *= i;
}
return total;
}
return total;
}
if(n==0) return 1;
return Fact(n-1);
}
if (a == 0) { return 1; }
else {
int fact = 1;
for (int i = 1; i <= a; i++) {
fact *= i;
}
return fact;
}
}
for(int i = x - 1;i < 0;--i){
if(i > 0){
x = x * i;
}
if(i == 0){
x = 1;;
}
if(i < 0){
break;
}
}
return x;
}
if (a == 0) return 1;
return a*Fact(a-1);
}
{
int result = 1;
for (int i = 2; i <= x; i++)
{
result *= i;
}
return result;
}
if (x == 0){
return 1;
}
int f = 1;
while (x > 0){
f *= x;
x--;
}
return f;
}
{
if (n < 0)
{
return -1; // Повертаємо -1 як помилку, якщо n менше 0.
}
int result = 1;
for (int i = 2; i <= n; i++)
{
result *= i;
}
return result;
}
if(n==0){
return 1;
}
else{
return n*Fact(n-1);
}
}
{
int answer = num;
if (num == 0){
return 1;
}
else{
return (answer + Fact(num-1));
}
}
if (n == 0) {
return 1;
}
else {
return n * Fact(n - 1);
}
}
{
int result = 1;
while(number>0)
{
result*=number;
number--;
}
return result;
}
{
int factNum = 1;
if (num == 0)
{
return 1;
}
for (int i = 1; i <= num; i++)
{
factNum *= i;
}
return factNum;
}
if(n<=2){
return 1;
}
return n*Fact(n-1);
}
if (num==0||num==1) return 1;
return num*Fact(num-1);
}
if(a == 0){
return 1;
} else {
return Fact(a - 1);
}
}
if(n == 0)
{return 1;}
else
{return n*Fact(n-1);}
}
{
if(n == 0)
return 1;
int result = 1;
for(int i = 1; i <= n; i++)
{
result *= i;
}
return result;
}
{
if(n==1||n==0){return 1;}
return n*Fact(n-1);
}
int fact = 1;
for (int i = 2; i < num; i++){
fact *= i;
}
return fact;
}
{
int result = 1;
for (int i = 1; i <= n; i++)
{
result *= i;
}
return result;
}
int a = 1;
if (f == 0)
{
a = 1;
}
else
{
a = 1;
int i = 2;
while(i <= f) {
a *= i;
i += 1;
}
}
return a;
}
if (a == 0) return 0;
return a * (a == 1 ? 1 : Fact(a - 1));
}
{
if (number <= 0)
{
return 1;
}
else
{
return number *= Fact(number - 1);
}
}
for (int i = x - 1; i > 0; i--)
{
x *= i;
}
return x;
}
if (x == 0) {
return 1;
}
else {
return x * Fact(x - 1);
}
}
if(n == 0){
return 1;
}
else{
return n*Fact(n-1);
}
}
{
if (n == 0) return 1;
return n * Fact(n - 1);
}
{
if (n >= 0)
{
int nFact = 1;
for (int i = n; i > 0; i--)
{
nFact *= i;
}
return nFact;
}
else
return 0;
}
{
int a = 1;
for(int i = 1; i <= n; i++)
{
a *= i;
}
return a;
}
{
if (number == 0)
{
return 1;
}
return number * Fact(number - 1);
}
if (x == 0)
return 1;
int res = 1;
for (int i = x; i >= 1; i--) {
res *= i;
}
return res;
}
int result = 0;
for (int i = num; i > 1; i--){
result *=i;
}
return result;
}
{
int fact = 1;
for (int i = 1; i <= x; i++)
{
x *= i;
}
return fact;
}
{
if (n == 0)
return 1;
else
return n * Fact(n - 1);
}
int result = 1;
for(int i = 1; i <= x; i++){
result *= i;
}
return result;
}
if (n == 1)
return n;
else if (n <= 0)
return 1;
else
return n * Fact(n - 1);
}
static int Fact (uint x)
{
//int i = 0;
for(uint i=1; i<=x; i++) {
x *= i;
}
int t = Convert.ToInt32(x);
return t;
}
if(x == 0){
return 0;
}
int res = 1;
for(int i = 1; i < x; i++){
res *= i;
}
return res;
}
int i,fact=1;
for(i=1;i<=n;i++){
fact=fact*i;
}
return fact;
}
{
if(num==0||num==1)
{
return 1;
}
else
{
return num * Fact(num-1);
}
}
int f = 1;
for(int i = 1; i <= n; i++) {
f *= i;
}
return f;
}
for(int i = 2; i <= x; i++){
x*=i;
}
return x;
}
if (n == 0){
return 1;
}
else {
return n*Fact(n-1);
}
}
int tipo;
int fact = 1;
for(int i = 0;i <= chislo; i++){
if(i == 0){
tipo = 1;
}
tipo = i;
fact *= tipo;
}
return fact;
}
if(n == 0) return 1;
if (n == 1) return 1;
return n * Fact(n - 1);
}
if(num == 0){
return 1;
}
else{
return num * Fact(num-1);
}
}
{
if (x == 0)
{
return 1;
}
int f = 1;
for (int i = 1; i <= x; i++)
{
f *= i;
}
return f;
}
int res = 1;
if(n == 0){
return res;
}
for(int i = 2; i <= n; i++){
res *= i;
}
return res;
}
{
if (n == 0)
{
return 1;
}
else
{
int fact = 1;
for (int i = 1; i <= n; i++)
{
fact *= i;
}
return fact;
}
}
if(n == 0){
return 1;
}
else{
return n * Fact(n - 1);
}
}
int res = 1;
for(int i = 1; i<=n; i++, res*=i);
return res;
}
{
if (n == 0)
{
return 1;
}
int result = 1;
for (int i = 1; i <= n; i++)
{
result *= i;
}
return result;
}
if(num == 0) {
return 1;
} else {
return num * Fact(num - 1);
}
}
int fact = 1;
for (int i=1; i<=num; i++){
fact*=i;
}
return fact;
}
{
if(n == 0 && n == 1) return 1;
int sum = 1;
for(int i = 0; i < n; i++) sum *= i;
return sum;
}
int i = 1;
do {i=i * (i + 1); }
while (i <= x);
return i;
}
{
int res = 1;
for (int i = 1; i <= n; i++)
{
res *= i;
}
return res;
}
int num = 1;
if (n < 2)
return num;
for (int i = 2; i <= n; ++i) {
num *= i;
}
return num;
}
if (num == 0 || num == 1) return 1;
return num * Fact(num - 1);
}
if(n == 0){
return 1;
}
else{ return n*Fact(n-1);
}
}
{
int answer = 1;
for (int i = 1; i <= n; i++)
{
answer *= i;
}
return answer;
}
{
if(num == 0) return 1;
int result = 1;
while(num > 0){
result *= num;
num --;
}
return result;
}
int fact = 1;
if(a == 0){
fact = 1;
}
else{
for(int i = 1; i <= a; i++){
fact *= i;
}
}
return fact;
}
if(number <= 0){
return 1;
}
else{
return number*Fact(number-1);
}
}
{
int result = 1;
for(int i = 1; i <= a; i++)
{
result *= i;
}
return result;
}
if(n == 0) return 1;
else return Fact(n - 1) * n;
}
if(a==1 || a==0) return 1;
return a* Fact (a-1);
}
if (x == 1 || x == 0){
return 1;
}
else {
return x * Fact(x - 1);
}
}
if(n == 0){
return 1;
}
int fact = 1;
for(int i = 1; i < n; i++){
fact *= i;
}
return fact;
}
{
if (n == 0)
{
return 1;
}
int result = 1;
for (int i = 1 ; i <= n;i++)
{
result = result * i ;
}
return result;
}
int n = 1;
if ( i == 0 ){
return 1;
}
else{
while ( i != 1 ){
n *= n++;
i--;
}
}
return n;
}
int a = 1;
for(int i = 1; i<=n; i++) a *= i;
return a;
}
int result = 1;
if(number == 0){
return 1;
}
for(byte i = 0;i < number;i++){
result *= i;
}
return result;
}
{
int res = 1;
for (int i = 2; i <= n; i++) {
res *= i;
}
return res;
}
{
int res = 1;
if(number == 0)
{
return 1;
}
for(int i = 0; i <= number; i++)
{
res *= i;
}
return res;
}
if ( n == 0 )
return 1;
else
for (int i = 1; i <= n; i++){
n *= i;
}
return n;
}
if(n==0) return 1;
int sum =1;
for(int i = 1; i<=n; i++){
sum*=i;
}
return sum;
}
{
int res= 1;
for (int i = 1; i <= n; i++){
res*=i;
}
return res;
}
int fact = 1;
for (int i = 1; i <= x; i++){
fact *= i;
}
return fact;
}
{
if (n == 0) return 1;
return n * Fact(n - 1);
}
{
int n = 1;
while(x > 1)
{
n *= x;
x--;
}
return n;
}
{
return n == 1 || n == 0 ? 1 : n * Fact(n - 1);
}
{
int result = 1;
for (int i = x; i > 0; i--)
result *= i;
return result;
}
if(n==0){
return 1;
}
else{
return n*Fact(n-1);
}
}
if(x <= 1) return 1;
return x * Fact(x-1);
}
{
int res = 1;
for (int i = 1; i <= n; i++)
{
res *= i;
}
return res;
}
{
if(a==0)
{return 1;}
else
for(int i=1;i< a+1;i++){
b*=i;
}
return b;
}
int a = 1;
for(int i = 1; i<=x; i++){
a= a*i;
}
return a;
}
{
int res = 1;
for(int i = 1; i < num; i++) res *= i;
return res;
}
var result = 1;
while(n > 0){
result *= n--;
}
return result;
}
{
int fact = 1;
for(int i =1;i<=n;i++) fact*=i;
return fact;
}
for (int num1 = 1; num1 < n +1; num1++)
{
res = res*num1;
}
return res;
}
if(n==0){
return 1;
}else{
return n*Fact(n-1);
}
}
if (num>0){
return num * Fact(num - 1);
}
else{
return 1;
}
}
{
int count = 1;
if (num == 0) return 1;
else
{
while(num != 1)
{
count *= num;
num -= 1;
}
return count;
}
}
if(x==0){
return 1;
}
else{
return x*Fact(x-1);
}
}