how to use combination iin loops

Suppose you give a dinner party for six guests, but your table seats only four. In how many ways can four of the six guests arrange themselves at the table? Any of the six guests can sit in the first chair. Any of the remaining five can sit in the second chair. Any of the remaining four can sit in the third chair, and any of the remaining three can sit in the fourth chair. (The last two will have to stand.) So the number of possible arrangements of six guests in four chairs is 6*5*4*3, which is 360. Write a program that calculates the number of possible arrangements for any number of guests and any number of chairs. (Assume there will never be fewer guests than chairs.) Don’t let this get too complicated. A simple for loop should do it.
can any one here who can do this problem i need kinda help...?
can any one here who can do this problem

yes, there is such a person here and that person is … you! Since it's your assignment, so you'd have to go first – write some code and/or pseudo-code and post it here and let's take it from there. Just copy/paste of your homework is not enough I'm afraid
Topic archived. No new replies allowed.