Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_KN / pract. 07
diff options
context:
space:
mode:
Commit8c75acbef313e5cc4e9a057950f1ac7ceb1da863 (patch)
Author
 Stoycho Kyosev <68247567+stoychoX@users.noreply.github.com>
2021-11-24 23:51:36 +0200
Committer
 GitHub <noreply@github.com>
2021-11-24 23:51:36 +0200
Files9325b1cd291035fb28b5abf3da62efd0ce23ba4c /pract_KN/pract. 07
Introduction_to_programming_FMI-8c75acbef313e5cc4e9a057950f1ac7ceb1da863.tar
Introduction_to_programming_FMI-8c75acbef313e5cc4e9a057950f1ac7ceb1da863.tar.gz
Introduction_to_programming_FMI-8c75acbef313e5cc4e9a057950f1ac7ceb1da863.zip
Parentaacdf322834cceaf4eca08fc9cf24db7457616ff (diff)
fix style problems
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;
}