1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alex_Xolod [135]
3 years ago
7

Outputting all combinations. Output all combinations of character variables a, b, and c using this ordering abc acb bac bca cab

cba.
If a = 'x', b = 'y', and c = 'z', then the output is: xyz xzy yxz yzx zxy zyx
Your code will be tested in three different programs, with a, b, c assigned with 'x', 'y', 'z', then with '#', '$', '%', then with '1', '2', '3'.

#include
using namespace std;
int main()
{
char a; char b; char c;
cin >> a; cin >> b; cin >> c;
/* Your solution goes here */
cout << endl;
return 0;
}
Computers and Technology
1 answer:
Alina [70]3 years ago
5 0

Answer:

#include<iostream>

using namespace std;

 

int main()

{

   char a;  

   char b;  

   char c;

cin >> a;  

cin >> b;  

cin >> c;

 cout<<a<<b<<c<<endl;

 cout<<a<<c<<b<<endl;

 cout<<b<<a<<c<<endl;

 cout<<b<<c<<a<<endl;

 cout<<c<<a<<b<<endl;

 cout<<c<<b<<a<<endl;

 

cout << endl;

}

Explanation:

Note: code is hard coded it does not contain any logic based coding

You might be interested in
Consider a system that uses a 32-bit unique salt where users have a 4-digit number as a password (e.g. 6813). Eve wants to crack
Alenkasestr [34]

Answer:

18000 seconds or 300 minutes.

Explanation:

In the example given in the question, it is stated that the system uses 32-bit unique salt which is equal to 4 bytes where every digit takes up 1 byte thus forming the 4 digit passwords.

Considering that the passwords are 4 digits, starting from 1000 and up to 9999, there are 9000 possible password combinations.

If Eve has to go through the whole range of possible password combinations and it takes her 1 second to guess 1 password. Then in the worst case scenario, it would take her 18000 seconds or 300 minutes to crack both accounts, assuming that it is possible for them to use the same passwords.

I hope this answer helps.

6 0
2 years ago
Read 2 more answers
In this lesson, you learned how to create reports and how to display them in a Web application. You will use the same chinook da
Nimfa-mama [501]

create a report that displays back tge total sales by country

6 0
2 years ago
Convert 578.2 into hexadecimal​
siniylev [52]
The answer is 243. Hope it helps
5 0
3 years ago
Can web sites contain copyright material? <br> Yes <br> No
Maru [420]
Yes they can contain copyright
6 0
2 years ago
Read 2 more answers
When did mac start? when did windows start? when did lynux start?
ale4655 [162]

Answer: Macintosh start January 24, 1984

Windows start November 20, 1985

Linux start October 5, 1991

7 0
3 years ago
Read 2 more answers
Other questions:
  • Which is the most efficient way to italicize a row of text in every worksheet in a workbook?
    8·1 answer
  • Data hiding, which means that critical data stored inside the object is protected from code outside the object, is accomplished
    14·2 answers
  • On a hard disk each track is divided into invisible wedge-shaped sections called _______
    15·1 answer
  • What is constructive criticism?
    5·1 answer
  • In preparing his persuasive presentation, Reza should most likely focus on clearly presenting his
    6·2 answers
  • One software license model allows software to be freely distributed, downloaded, and installed without paying a license fee but
    15·1 answer
  • For this exercise, you'll use the Rectangle class below (you can assume that the length and width are measured in feet).
    12·1 answer
  • What are the disadvantages of using pointers?
    6·1 answer
  • What simple machine is most often used to lift the blinds on a window?
    8·2 answers
  • Given a number n, for each integer i in the range from 1 to n inclusive, print one value per line as follows:
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!