Next time when you post your code, make sure to ask the question that you have.
I'm simply going to guess what you are trying to do.
In main, you need to call your slope and midpoint functions. I'm also going to guess your midpoint function needs to return a double and actually return the midpoint that it calculates.
Calling a function looks like this.
1 2 3 4 5 6 7 8 9 10 11 12
int foo(int a, int b, int c)
{
return a + b + c;
}
int main()
{
// Instead of passing 1, 2, and 3, I could also
// set variables to these and pass them in the function.
int fooReturnValue = foo(1, 2, 3);
return 0;
}