diff options
| author | Asahel <[email protected]> | 2024-02-12 09:14:39 -0800 |
|---|---|---|
| committer | Asahel <[email protected]> | 2024-02-12 09:14:39 -0800 |
| commit | 73f07ebff7508d9c84a057de5aed162ac1c3da32 (patch) | |
| tree | 19f2da57f25ea19cd8b3840d80995dea367f4b17 /InClassExercise 9/PointerExercises.cpp | |
| parent | Completed assignment. (diff) | |
| download | in-class-exercise-9-asahellt-73f07ebff7508d9c84a057de5aed162ac1c3da32.tar.xz in-class-exercise-9-asahellt-73f07ebff7508d9c84a057de5aed162ac1c3da32.zip | |
Not sure if I commited. Making sure.
Diffstat (limited to 'InClassExercise 9/PointerExercises.cpp')
| -rw-r--r-- | InClassExercise 9/PointerExercises.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
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 <iostream> +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 |