0

I need help writing functions. In this program I need to be able to implement a number of useful functions using a header file and an implementation file. I also need to place the prototypes for my function in a .h file, and implement these functions in a .cpp file. I also need to write a driver to test your functions before you upload them.

```
Deliverables:
MyFunctions.h
MyFunctions.cpp
Driver.cpp
Function:
1. maximum
a. Precondition
i. two integer values exist
b. Postcondition
i. The value of the largest integer is returned.
ii. The original integers are unchanged
iii. If the integers have the same value then the value of either integer is returned.
c. Return
i. integer
d. Description
i. Function returns the value of the larger of two integers.
e. Prototype: int maximum ( int, int );
This is my headerfile so far.
/**************************************
headerfile
***************************************/
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
#include <iostream>
using namespace std;
int maximum (int, int);
double maximum (double, double);
int minimum (int, int);
double minimum (double, double);
int absolute (int);
double absolute (double);
double power (double, int);
double squareRoot (double);
double hypotenuse(double, double);
and my driver file
/**************************************
driver.cpp
***************************************/
#include "function.h"
int main ()
{
if(intmaximum>int)
{
cout<<intmax;
}
else if(intmax==int)
{
cout<<intmax<<int;
}
else
cout<<"ERROR!"<<endl;
}
```

i would really appreciate some help. Thanks

*Edited 3 Years Ago by happygeek*: fixed formatting