aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
authoraustinlujan <[email protected]>2024-03-20 20:10:57 -0700
committeraustinlujan <[email protected]>2024-03-20 20:10:57 -0700
commit1147ba66743e8fa60247398c5477fecdf241fccd (patch)
tree13338b6f4bd187560ac92941c617d04547e13a7a /Project1/program.cpp
parentadd deadline (diff)
downloadin-class-exercise-6-austinlujan-main.tar.xz
in-class-exercise-6-austinlujan-main.zip
exercise 6 functions implemented and testedHEADmain
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp
new file mode 100644
index 0000000..477e05a
--- /dev/null
+++ b/Project1/program.cpp
@@ -0,0 +1,44 @@
+
+
+
+#include <iostream>
+
+#include "helpers.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;
+} \ No newline at end of file