diff options
| -rw-r--r-- | InClassEx_6/InClassEx_6/EX_6.cpp | 31 | ||||
| -rw-r--r-- | InClassEx_6/InClassEx_6/Header_Ex_6.h | 5 |
2 files changed, 36 insertions, 0 deletions
diff --git a/InClassEx_6/InClassEx_6/EX_6.cpp b/InClassEx_6/InClassEx_6/EX_6.cpp index ee64101..010b19e 100644 --- a/InClassEx_6/InClassEx_6/EX_6.cpp +++ b/InClassEx_6/InClassEx_6/EX_6.cpp @@ -8,3 +8,34 @@ #include "Header_Ex_6.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; +} diff --git a/InClassEx_6/InClassEx_6/Header_Ex_6.h b/InClassEx_6/InClassEx_6/Header_Ex_6.h index 157ab0e..56d46ba 100644 --- a/InClassEx_6/InClassEx_6/Header_Ex_6.h +++ b/InClassEx_6/InClassEx_6/Header_Ex_6.h @@ -1,8 +1,13 @@ #ifndef MY_HEADER_FILE_h #define MY_HEADER_FILE_h +int math_func(); +int math_func(int square); +int math_func(int a, int b); + +int math_func(int A, int B, int C, int x=2); #endif |