#include <iostream>
using namespace std;
int main() {
int n;
cout<<" enter value of n :"<<endl;
cin>>n;
int r;
cout<<" enter value of r : "<<endl;
cin>>r;
int a;
a=1;
for(int i =1; i<=n; i++){
a=i*a;
}
int b;
b=1;
for(int i=1; i<=r; i++){
b=i*b;
}
int c;
c=1;
for(int i=1; i<=n-r; i++){
c=i*c;
}
cout<<a/(b*c);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: