Hello all. I wrote a program that gives me 100 random values from the range between -100 to +100. How am I supposed to find the minimum, maximum, and average of the values that will be listed when I run the program? I appreciate the help anyone can give me. Also, this is for a class and we are not allowed to use Arrays. Thanks again.
Here is what I have so far:
float random_integer;
float lowest=-100.00, highest=100.00;
float range=(highest-lowest)+1;
for(float index=0; index<100; index++) {
random_integer = lowest+float(range*rand()/(RAND_MAX + 1.0));
cout << random_integer << endl; }
float sum;
float average;
float minimum, maximum;
minimum= (not sure what to put here...);
cout << ("Minimum:")<<minimum << endl;