Please Review C 20 Random Number Writes File Numberstxt Function Also Write Program Reads Q43897168
please review and this C++ 20 random number and writes them to afile “numbers.txt” with function and also
write a program that reads the 20 numbers from numbers.txt anddetermines & prints:
- minimum
- maximum
- total
- average
use arrays and functions if you can
// save on digication topic 12
#include<iostream>
#include<cstdlib>
#include <ctime>
#include<fstream>
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 =
//}
Expert Answer
Answer to please review and this C++ 20 random number and writes them to a file “numbers.txt” with function and also write a progr…
OR