From 73f07ebff7508d9c84a057de5aed162ac1c3da32 Mon Sep 17 00:00:00 2001 From: Asahel Date: Mon, 12 Feb 2024 09:14:39 -0800 Subject: Not sure if I commited. Making sure. --- InClassExercise 9/PointerExercises.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 InClassExercise 9/PointerExercises.cpp (limited to 'InClassExercise 9/PointerExercises.cpp') diff --git a/InClassExercise 9/PointerExercises.cpp b/InClassExercise 9/PointerExercises.cpp new file mode 100644 index 0000000..003734d --- /dev/null +++ b/InClassExercise 9/PointerExercises.cpp @@ -0,0 +1,21 @@ +#include "PointerExercises.h" +#include +using std::cout; +using std::endl; + +void Swap(Node* first, Node* second) +{ + int temp = first->_num; + first->_num = second->_num; + second->_num = temp; +} + +void Standardize_101(Node* node) +{ + node->_num %= 101; +} + +void Square(Node* node) +{ + node->_num *= node->_num; +} \ No newline at end of file -- cgit v1.2.3