not returning what i want

i'm trying to write a function that returns decimal average but when it return it return with crazy number and letters.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
using namespace std;
int average (double,double,double); 

int main ()
{
	//Write a function that takes in three integer parameters and returns their decimal average. (How does this differ from the previous problem?)

	double int1, int2, int3;
	cout << "Please enter three integers. \t";
	cin >> int1 >> int2 >> int3;
	cout << "\nThe Average is " << average << endl;





return 0;
}

int average (double input1, double input2, double input3)
{
	double total;
	total = (input1 +input2 + input3) / 3.0;
	return total;
}
Hi,

You never called the average function in your main(), call it after you input the digits....
Topic archived. No new replies allowed.