आपकी ऑफलाइन सहायता

BACK
49

सी प्रोग्रामिंग

149

पाइथन प्रोग्रामिंग

49

सी प्लस प्लस

99

जावा प्रोग्रामिंग

149

जावास्क्रिप्ट

49

एंगुलर जे.एस.

69

पी.एच.पी.
माय एस.क्यू.एल.

99

एस.क्यू.एल.

Free

एच.टी.एम.एल.

99

सी.एस.एस.

149

आर प्रोग्रामिंग

39

जे.एस.पी.





डाउनलोड पी.डी.एफ. ई-बुक्स
C - Value Of Ncr

विवरण :

कोई विवरण नहीं है |


सोर्स कोड :

#include<stdio.h>

int main()
{
int n,r,ncr;

printf("Enter n and r :");
scanf("%d%d", &n, &r);

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

printf("The nCr factor of %d and %d is %d", n, r, ncr);

return 0;
}

int fact(int n){
int i=1;
while( n!=0 ){
i=i*n;
n--;
}
return i;
}

आउटपुट :