0

I'm having some trouble with this averaging program. This program is supposed to determine the final average by taking the sum of the products of the scores, multiplied by the weights and dividing by the sum of the weights. The output of the program includes each score-weight combination retrieved, the number of score-weight combinations returned, the sum of the products, the sum of the weights, the average, and the letter grade that would be issued given the average.

here is what i have so far...:?:

```
#include<iomanip>
#include<iostream>
//#include<conio>
using namespace std;
bool getdata(int &,int &);
int main(int argc, char* argv[])
{
int score, weight;
double sumProduct
sumWeight, // The sum of the weights
average; // the Semester average= sumProduct/sumWeight
char grade;
randomize();
// getch();
return 0;
}
bool getdata(int &score,int &weight)
{
static int final =rand()%30+20;
score=rand()%100+1;
weight=rand()%100+1;
final--;
if(final >0)
{
if (weight < 25)
weight=10;
else
weight=5;
return true;
}
else
{
weight=25;
return false;
}
}
//---------------------------------------------------------------------------
```

thanks!