-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwithout-repetition.cpp
39 lines (38 loc) · 1.03 KB
/
without-repetition.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
*
* @Name : CombiningElements/without-repetition.cpp
* @Version : 1.0
* @Programmer : Max
* @Date : 2019-06-25
* @Released under : https://github.com/BaseMax/CombiningElements/blob/master/LICENSE
* @Repository : https://github.com/BaseMax/CombiningElements
*
**/
#include <iostream>
#include <string>
using namespace std;
int main() {
const int length=6;
string values[length];
cout << "Enter values:\n";
for(int index = 0; index < length;index++) {
cin >> values[index]; // Get a word
// getline(cin, values[i]); // Get a line
}
for(int index1 = 0;index1 < length; index1++) {
for(int index2 = 0;index2 < length; index2++) {
for(int index3 = 0;index3 < length; index3++) {
for(int index4 = 0;index4 < length;index4++) {
for(int index5 = 0; index5 < length;index5++) {
for(int index6 = 0; index6 < length;index6++) {
cout << values[index1] << values[index2] << values[index3] << values[index4] << values[index5] << values[index6] << endl;
}
}
}
}
}
}
cin.get();
cin.get();
return 0;
}