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.

Welcome to Daniweb. This site is about getting help but does not supply code for you to submit to your class assignments.

What works is for you to show your work so far and then tell where you are stuck. Your assignment has a lot of steps so if all the steps are confusing I have to wonder if you skipped all the work leading up to this assignment. In such a case you go back to the prior chapters to catch up.