Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String sNumbers = JOptionPane.showInputDialog("Enter in the amount of possible numbers: \n");
- int iNumbers = Integer.parseInt(sNumbers);
- String sBalls = JOptionPane.showInputDialog("Enter in the amount of balls taken: \n");
- int iBalls = Integer.parseInt(sBalls);
- int iFactorial = 1;
- int iCount = 0;
- int iTotal = iNumbers;
- for(iCount = (iNumbers - 1); iCount > (iNumbers - iBalls); iCount--){
- iTotal *= iCount;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement