Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_KN / pract. 07 / solutions.cpp
diff options
context:
space:
mode:
1 files changed, 2 insertions, 3 deletions
-rw-r--r--pract_KN/pract. 07/solutions.cpp5
diff --git a/pract_KN/pract. 07/solutions.cpp b/pract_KN/pract. 07/solutions.cpp
index f53555c..dc19374 100644
--- a/pract_KN/pract. 07/solutions.cpp
+++ b/pract_KN/pract. 07/solutions.cpp
@@ -38,14 +38,13 @@ void printSubset(int arr[], int length, int indexOfSet) {
std::cout << ']' << std::endl;
}
-void generateSubSets(int arr[], int length) {
- int mask = 0;
+void generateSubsets(int arr[], int length) {
int border = 1 << length;
for (int i = 0; i < border; i++)
printSubset(arr, length, i);
}
-//bonus: function to change sign of a number
+//bonus: function to change the sign of a number
void changeSign(int& n) {
n = ~n + 1;
}