import javax.swing.JOptionPane;
public class Digui {
public static void main(String[] args) {
String output = "", number, number1;
int n = 0, m = 0;
long k = 0;
number = JOptionPane.showInputDialog("请输入m的值!");
number1 = JOptionPane.showInputDialog("请输入n的值!");
m = Integer.parseInt(number);
n = Integer.parseInt(number1);
k = jie(m) / (jie(m - n) * jie(n));
output = "C(m,n)的组合为:" + k;
JOptionPane.showMessageDialog(null, output);
}
public static int jie(int n) {
if (n == 1 || n == 0)
return 1;
else
return n * jie(n - 1);
}
}