help i'm rather new at this but have some understanding but am having some probs with
1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(8) : error C2144: syntax error : 'int' should be preceded by ';'
1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(9) : error C2447: '{' : missing function header (old-style formal list?)
i am makeing an number averageing script with a variable amount of numbers to be averaged.
Here is my code
#include <set>
#include <iostream>
using namespace std;
double atotal()
int main();
{
double itotal = 0;
double dnumber1 = 0.0;
double dnumber2 = 0.0;
double dnumber3 = 0.0;
double daverage = 0.0;
double a = 0;
cout << "please enter how many numbers: " <<endl;
cin >> itotal;
atotal(itotal);
cout << "start entering numbers" <<endl;
for(a = 0; a < itotal; ++a);
{
cin >> atotal(a);
}
//cin >> dnumber1;
//cin >> dnumber2;
//cin >> dnumber3;
daverage = (dnumber1 + dnumber2 + dnumber3) / 3;
cout << "the average for your numbers is : " << daverage << endl <<endl;
system ("pause");
return 0;
}
thx for ur help.