Hello! Can you help me to create a programm,wich counts the number of permutations.
I want to use function "next_permutation".
Numbers must be entered from the keyboard(two number).
I will be grateful!!!!
C++ or C#
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kira PolyakovaPosted Sep 23, 2013, 10:42 AM
VulpesPosted Sep 23, 2013, 10:28 AM
http://www.cplusplus.com/reference/algorithm/next_permutation/
But, if only two numbers are to be input, then there are only two possible permutations so you don't really need to use this function.
This, of course, is C++ code. To my knowledge, there is no equivalent of next_permutation in the .NET Framework used by C# though it would be possible to write one.