aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNataliia Brown <[email protected]>2024-02-12 09:02:00 -0800
committerNataliia Brown <[email protected]>2024-02-12 09:02:00 -0800
commit9e1910ae72f2e884df5766e8b9293eb86c451bbf (patch)
tree246d1d170f7208e937e21504026e36d50d7c2e24
parentfirst function added (diff)
downloadin-class-exercise-10-natabrown-9e1910ae72f2e884df5766e8b9293eb86c451bbf.tar.xz
in-class-exercise-10-natabrown-9e1910ae72f2e884df5766e8b9293eb86c451bbf.zip
second function
-rw-r--r--In-Class Exercise 10/In-Class Exercise 10/PointerExamples.cpp4
-rw-r--r--In-Class Exercise 10/In-Class Exercise 10/program.cpp11
2 files changed, 8 insertions, 7 deletions
diff --git a/In-Class Exercise 10/In-Class Exercise 10/PointerExamples.cpp b/In-Class Exercise 10/In-Class Exercise 10/PointerExamples.cpp
index 493504c..6e68998 100644
--- a/In-Class Exercise 10/In-Class Exercise 10/PointerExamples.cpp
+++ b/In-Class Exercise 10/In-Class Exercise 10/PointerExamples.cpp
@@ -19,9 +19,7 @@ void Swap(Node* first, Node* second)
}
void Standardize_101(Node* node) {
-
- /*n = n % 101;*/
-
+ node->_num = node->_num % 101;
}
void Square(Node* node) {
diff --git a/In-Class Exercise 10/In-Class Exercise 10/program.cpp b/In-Class Exercise 10/In-Class Exercise 10/program.cpp
index fcbf6a0..0243ba7 100644
--- a/In-Class Exercise 10/In-Class Exercise 10/program.cpp
+++ b/In-Class Exercise 10/In-Class Exercise 10/program.cpp
@@ -20,16 +20,19 @@ int main() {
firstNode._num = 15;
secondNode._num = 20;
-
-
Swap(&firstNode, &secondNode);
cout << "Firts Node is " << firstNode._num << endl;
cout << "Second Node is " << secondNode._num << endl;
- /*Standardize_101(&thirdNode);
+ Node standNode{};
+ standNode._num = 1500;
+ Standardize_101(&standNode);
+ cout << "Standardized Node is " << standNode._num << endl;
+
+
- Square(&thirdNode);*/
+ /*Square(&thirdNode);*/
} \ No newline at end of file