Skip to content

Commit 21fd196

Browse files
authored
Update without-repetition.cpp
1 parent 6954c19 commit 21fd196

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

without-repetition.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ using namespace std;
1414

1515
int main() {
1616
const int length=6;
17+
string values[length];
1718
cout << "Enter values:\n";
18-
string texts[length];
1919
for(int index = 0; index < length;index++) {
20-
cin >> texts[index]; // Get a word
21-
// getline(cin, texts[i]); // Get a line
20+
cin >> values[index]; // Get a word
21+
// getline(cin, values[i]); // Get a line
2222
}
2323
for(int index1 = 0;index1 < length; index1++) {
2424
for(int index2 = 0;index2 < length; index2++) {
2525
for(int index3 = 0;index3 < length; index3++) {
2626
for(int index4 = 0;index4 < length;index4++) {
2727
for(int index5 = 0; index5 < length;index5++) {
2828
for(int index6 = 0; index6 < length;index6++) {
29-
cout << texts[index1] << texts[index2] << texts[index3] << texts[index4] << texts[index5] << texts[index6] << endl;
29+
cout << values[index1] << values[index2] << values[index3] << values[index4] << values[index5] << values[index6] << endl;
3030
}
3131
}
3232
}

0 commit comments

Comments
 (0)