Sep 29, 2012 at 1:15am UTC
I am having trouble identifying a declaration v an executable statement. I just started C++ 2 weeks ago and I'm not familiar with the language. In the code below which are declaration and executable statements and why are such a declaration and an executable statement?
// =============================================================================
int main (void)
{
double Average (double [], int);
double Deviation (double [], int);
bool Done (int);
void Input (double [], int &);
void Intro (void);
void Print (double [], int, double, double);
double mean, stddev, score [100];
int count;
Intro ();
count = 0;
Input (score, count);
mean = Average (score, count);
stddev = Deviation (score, count);
Print (score, count, mean, stddev);
return 0;
}
void Intro (void)
{
system ("cls");
PrintLine (5, 77, 2, '=', 'c');
cout << setw (55) << "AVERAGE and STANDARD DEVIATION";
SkipLine (2, 'c');
cout << setw (64) << "The scores are inputted from an input textfile.";
PrintLine (2, 77, 2, '=', 'c');
Pause ();
return;
}
Sep 29, 2012 at 1:37am UTC
Declarations declare names that will be used in the program.
Sep 29, 2012 at 6:45pm UTC
so In this case
double Average (double [], int);
double Deviation (double [], int);
bool Done (int);
void Input (double [], int &);
void Intro (void);
void Print (double [], int, double, double);
double mean, stddev, score [100];
int count;
are the declaration?