Question: please review and this C++ 20 random number and writes them to a file numbers.txt with function and also write a program that reads the

please review and this C++ 20 random number and writes them to a file "numbers.txt" with function and also

write a program that reads the 20 numbers from numbers.txt and determines & prints:

  • minimum
  • maximum
  • total
  • average

use arrays and functions if you can

// save on digication topic 12 #include #include #include #include using namespace std; int main() { srand(time(0)); double randNumber; int minimum = 1; int maximum = 20; randNumber = ((rand() % (maximum - maximum + 1) + minimum)); system("pause"); return 0;

}

//int randomNumber; //for (int index = 0; index < 20; index++) { // randomNumber = //}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!