Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7758799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:27:30+00:00 2026-06-01T13:27:30+00:00

I know from Algebra class that with ABC and 123 we can make 216

  • 0

I know from Algebra class that with ABC and 123 we can make 216 different permutations for a three letter string, right? (6 x 6 x 6) I’d like to create a console program in C++ that displays ever possible permutation for the example above. The thing is, how would I even begin trying to calculate them. Perhaps:

AAA
BAA
CAA
1BA
2BA
3CA
1AB
2BC
3CA

etc.

This is really hard to ask, but what would I have to do to ensure that I include every permutation? I know there are 216 but I don’t know how to actually go about going through all of them.

Any suggestions would be greatly appreciated!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:27:32+00:00Added an answer on June 1, 2026 at 1:27 pm

    If you need a fixed-number strings, you can use N nested loops (three in your case).

    string parts = "ABC123";
    for (int i = 0 ; i != parts.size() ; i++)
        for (int j = 0 ; j != parts.size() ; j++)
            for (int k = 0 ; k != parts.size() ; k++)
                cout << parts[i] << parts[j] << parts[k] << endl;
    

    If N is not fixed, you would need a more general recursive solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know from here that I can pass an ignore option in the jQuery.validate
I know from reading Microsoft documentation that the "primary" use of the IDisposable interface
I know from this question that Firefox 3.0 and up stores its cookies in
I know from wikipedia for example that exception handling is used in an application
I know from reading the assoc. Google group that there is not currently an
Does any one know from where can I download source code for Cassini. I
I know from the codeing guidlines that I have read you should not do
We know from the C# specification that reference read/writes are atomic. In a statement
We know from Credit card expiration dates - Inclusive or exclusive? that credit card
I know from reading parashift.com that using delete on a pointer frees the memory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.