aboutsummaryrefslogtreecommitdiff
path: root/Inclass 10/program.cpp
blob: c1191ec8c4833713f74d409e528a7754279695e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// name: Connor McDowell
// date: 2/8/2024
// class: CIS116
// reason: Inclass exercise 10

#include <iostream>
#include "Header.h"
#include "Node.h"

using std::cin;
using std::cout;
using std::endl;

int main()
{
	Node newNode{};

	int i;
	cin >> i;

	newNode.data = i;

	cout << newNode.data << endl;

	Node nextNode{};

	nextNode.data = 438;

	newNode.next = &nextNode;

	cout << nextNode.data << endl;

	Swap(&newNode, &nextNode);

	cout << "first node swapped is: " << newNode.data << " the second node swapped is : " << nextNode.data << endl;

	Standardize_101(&newNode);

	cout << newNode.data << endl;

	Square(&nextNode);

	cout << nextNode.data << endl;
	
	return 0;
}