diff --git a/avg.cpp b/avg.cpp index dc3c54d..ee1db11 100644 --- a/avg.cpp +++ b/avg.cpp @@ -2,6 +2,8 @@ // essentially allowing this file to fill that contract #include "avg.h" -double average(double a, double b){ +double average(double a, double b) +{ return (a + b)/2; } + diff --git a/main.cpp b/main.cpp index 33dfdbc..cb7969c 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,6 @@ #include #include "avg.h" +#include "avg.cpp" using namespace std; //this is the actual program and it gets to use our "module" just like any other. @@ -8,3 +9,4 @@ int main(){ cout << average(34.0, 36.0) << endl; return 0; } +