i get this error on the last line of code before the final closed brace
here is the whole program (i want to average together 3 numbers)
#include
#include
using namespace std;
double avg (double a, double b, double c);
int main ()
{
double a, b, c;
cout<<"Enter a Number that is greater than zero:";
cin>>a;
cout<<"Enter another Number greater than zero:";
cin>>b;
cout<<"Enter the Final number:";
cin>>c;
cout<<"The average of the three numbers is:";
cout<
char z;
cin>> z;
return 0;
}
double avg (double a, double b, double c)
{
avg=(a+b+c)/3;
}
2006-10-23
13:05:15
·
9 answers
·
asked by
Demetri N
2
in
Programming & Design