From 9e1910ae72f2e884df5766e8b9293eb86c451bbf Mon Sep 17 00:00:00 2001 From: Nataliia Brown Date: Mon, 12 Feb 2024 09:02:00 -0800 Subject: second function --- In-Class Exercise 10/In-Class Exercise 10/PointerExamples.cpp | 4 +--- In-Class Exercise 10/In-Class Exercise 10/program.cpp | 11 +++++++---- 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 -- cgit v1.2.3