n C++ Please make sure to match the outputs provided. Do not add any additional libraries. Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one word names (until -1), and use a recursive method to create and output all possible orderings of those names separated by a comma, one ordering per line. When the input is: Julia Lucas Mia -1 then the output is (must match the below ordering): Julia, Lucas, Mia Julia, Mia, Lucas Lucas, Julia, Mia Lucas, Mia, Julia Mia, Julia, Lucas Mia, Lucas, Julia

Microsoft Windows 10 Comprehensive 2019
1st Edition
ISBN:9780357392607
Author:FREUND
Publisher:FREUND
Chapter3: File And Folder Management
Section: Chapter Questions
Problem P2EYK
icon
Related questions
Question
100%

In C++ Please make sure to match the outputs provided. Do not add any additional libraries.

Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one word names (until -1), and use a recursive method to create and output all possible orderings of those names separated by a comma, one ordering per line.

When the input is:

Julia Lucas Mia -1

then the output is (must match the below ordering):

Julia, Lucas, Mia Julia, Mia, Lucas Lucas, Julia, Mia Lucas, Mia, Julia Mia, Julia, Lucas Mia, Lucas, Julia

Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one
word names (until -1), and use a recursive method to create and output all possible orderings of those names separated by a comma, one
ordering per line.
When the input is:
Julia Lucas Mia -1
then the output is (must match the below ordering):
Julia, Lucas, Mia
Julia, Mia, Lucas
Lucas, Julia, Mia
Lucas, Mia, Julia
Mia, Julia, Lucas
Mia, Lucas, Julia
Transcribed Image Text:Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one word names (until -1), and use a recursive method to create and output all possible orderings of those names separated by a comma, one ordering per line. When the input is: Julia Lucas Mia -1 then the output is (must match the below ordering): Julia, Lucas, Mia Julia, Mia, Lucas Lucas, Julia, Mia Lucas, Mia, Julia Mia, Julia, Lucas Mia, Lucas, Julia
Input
Chloe Mila Kellan -1
Chloe, Kellan, Mila
Chloe, Mila, Kellan
Kellan, Chloe, Mila
Your output
Kellan, Mila, Chloe
Mila, Chloe, Kellan
Mila, Kellan, Chloe
Chloe, Mila, Kellan
Chloe, Kellan, Mila
Mila, Chloe, Kellan
Expected output
Mila, Kellan, Chloe
Kellan, Chloe, Mila
Kellan, Mila, Chloe
Transcribed Image Text:Input Chloe Mila Kellan -1 Chloe, Kellan, Mila Chloe, Mila, Kellan Kellan, Chloe, Mila Your output Kellan, Mila, Chloe Mila, Chloe, Kellan Mila, Kellan, Chloe Chloe, Mila, Kellan Chloe, Kellan, Mila Mila, Chloe, Kellan Expected output Mila, Kellan, Chloe Kellan, Chloe, Mila Kellan, Mila, Chloe
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Windows 10 Comprehensive 2019
Microsoft Windows 10 Comprehensive 2019
Computer Science
ISBN:
9780357392607
Author:
FREUND
Publisher:
Cengage
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning