How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask ATLPROG Your Own Question

ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 9151
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
44910485
Type Your Programming Question Here...
ATLPROG is online now
A new question is answered every 9 seconds

In C++ Write a program that produces ten random permutations

Customer Question

In C++:

•Write a program that produces ten random permutations of the numbers 1 to 10. To generate a random permutation, you need to fill a vector with the numbers 1 to 10 so that no two entries of the vector have the same contents. You could do it by brute force, by calling rand_int until it produces a value that is not yet in the vector. Instead, you should implement a smart method.
•Make a second array and fill it with the numbers 1 to 10. Then pick one of those at random, remove it, and append it to the permutation vector.
•Repeat ten times.
Submitted: 5 years ago.
Category: Programming
Expert:  ATLPROG replied 5 years ago.

ATLPROG :

Hi, Welcome back

ATLPROG :

I should be able to help you.

ATLPROG :

Can you please let me know by when you want this done

Customer :

As soon as possible would be preferred

Customer :

It is a class assignment dues next wed 6 Jul

Customer :

hello?

ATLPROG :

I will have it ready for you

ATLPROG :

Please let me know when you are back online and i would provide an answer

Customer :

I will be off and on all day today. Will make it a point to check at 5 PM PST.

ATLPROG :

You still there ?

Customer :

yes

ATLPROG :

Here is the Answer_Link

Customer :

hmm having problems downloading it

ATLPROG :

what problem are you facing ?

Customer :

getting an error....think it is my browser

Customer :

unexpected error

ATLPROG :

ok..

Customer :

let me restart

ATLPROG :

ok

ATLPROG :

any luck ?

ATLPROG :

Please let me know if you need any changes to the program, If it looks ok i would appreciate if you could accept the answer

Related Programming Questions