Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion avg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include<iostream>
#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.
Expand All @@ -8,3 +9,4 @@ int main(){
cout << average(34.0, 36.0) << endl;
return 0;
}