Question: Create a program to read the file numbers.txt where there are an unknown number of integer numbers. They must be added and averaged. The
Create a program to read the file "numbers.txt where there are an unknown number of integer numbers. They must be added and averaged. The sum and the average must be displayed.
Example of file:
USE THE NEXT TEMPLATE MANDATORY:
DO NOT MODIFY THIS SECTION
#include
#include
using namespace std;
int main
ifstream infile;
int num, sum;
float average;
infile.open "numbers.txt;
ADD YOUR CODE FROM HERE
Example:
Sum average
Rubric
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
