I'm having a difficulty to write this program in c++ please help me
First generate 100 random numbers in the range [11, 25] and store them in a file named “random.txt”. Write just one number in each row.
Then open and read data from the file “random.txt”. Calculate the average of all the 100 number and count how many times the number 16 occurs. Using only one single loop in this step. That is, update the running total and the occurrence of 16 during each repetition of the loop. Sample file and output are given as below.
Sandy0221 0 Newbie Poster
rproffitt 2,662 "Nothing to see here." Moderator
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.