I've tried everything I know and I don't know what to do now. I'm using a random number generator and I need helping getting the average of the numbers the generator makes plz help!
#include
#include
#include
#include
int main (void)
{
int n;
int repeat;
int random_integer;
float dem;
ifstream infile;
infile.open("C:\Numbers.DAT", ios::in);
if (infile)
{
infile >> repeat;
infile.ignore(80, '\n');
for(int x = 1; x <= repeat; x++)
{
infile >> random_integer;
infile.ignore(80, '\n');
cout << random_integer << endl;
dem = random_integer%2;
2007-02-03
15:33:18
·
5 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design