I think your error comes from line 6. You need to have a decleration that's identical to the first line of your definition (except your decleration must end with a semi-colon -- which you did).
So line 6 I think should be:
double area(int a, int b, int c);//don't forget the semi-colon if you're copy-pasting from the function definition
Two more points. In the future when you post your code, press the "<>" button next to the box where you write your posts. This will make your code appear nice and tidy like this.Secondly this line is going to give you trouble:
int s = ((a+b+c)/2);
To illustrate this point, take the following example:
1 2 3 4 5 6
short a, b, c;
a=1;
b=2;
c=4;
cout << ((a+b+c)/2);//this line will display THREE (3) not 3.5 because you're using integers
To have the above line work correctly, one or more of the numbers on line 6 to the right of the "=" symbol in the above code have to be of the type double -- so either define a, b, and/or c as type "double" or divide by "2.0" as opposed to "2" (the first is a double and the latter is an integer).
Either will work:
1 2 3 4 5 6
double a, b, c;//a b and c are DOUBLEs
a=1;
b=2;
c=4;
cout << ((a+b+c)/2);
1 2 3 4 5 6
short a, b, c;
a=1;
b=2;
c=4;
cout << ((a+b+c)/2.0);//using 2.0 instead of 2