summaryrefslogtreecommitdiff
path: root/Project1/inclass6.cpp
blob: ead6f8077a9647708139a41c49dc39987109f682 (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
47
48
49
50
// Name: Connor McDowell
// Date: 1/27/2024
// Class: CST116
// Assignment: exercise 6

#include <iostream>

#include "header.h"

int main()
{

	std::cout << math_func() << std::endl;

	std::cout << math_func(2) << std::endl;

	std::cout << math_func(2, 4) << std::endl;

	std::cout << math_func(5, 7, 8) << std::endl;

	return 0;
}

int math_func()
{

	return 1;
}

int math_func(int square)
{


	return square * square;
}

int math_func(int a, int b)
{


	return a + b;
}

int math_func(int A, int B, int C, int x)
{


	return (A * x * x) - (B * x) + C;
}