Program to find NCR value of the given numbers

Program:

#include<stdio.h>
#include<conio.h>
long fact(int);
void main()
{
    long i, ncr;
    int n, r;
    clrscr();
    printf("Enter the value for N : ");
    scanf("%d", &n);
    printf("\nEnter the value for R : ");
    scanf("%d", &r);
    if(n >= r)
    {
        ncr = fact(n) / (fact(n-r) * fact(r));
        printf("\nThe NCR value is : %ld", ncr);
    }
    else
        printf("\nCalculating NCR value is not possible");
        getch();
}
long fact(int i)
{
    long x;
    if(i == 0)
    return 1;
    else
    {
        x = i * fact(i - 1);
        return x;
    }
}

Output:

Case: 1

Enter the value for N : 7
Enter the value for R : 5
The NCR value is : 21

Case: 2

Enter the value for N : 5
Enter the value for R : 7
Calculating NCR value is not possible