Computer Science, asked by meenavenki1999143, 4 months ago

Program to calculate ncr=n!/r!*n-r!and npr using function flowchart​

Answers

Answered by vaibhavdantkale65
1

Answer:

Program to calculate ncr=n!/r!*n-r!and npr using function flowchart

Answered by bmlavanya942005
0

Answer:

#include<stdio.h>

int fact(int) ;

void main()

{

int n, r, ncr;

printf("\n enter n&r where n>r")

scanf("%d %d", &n, &r")

ncr=fact(n) /((fact(r) *fact(n-r))) ;

printf("\n NCR=%d", ncr) ;

}

int fact(int x)

{

int f=1;

int I;

for(i=1;i<=x;i++)

f=f*i;

return(f) ;

}

Similar questions