Question
Course (Programming and problem solving with c++, introcourse) HW problem, need help (using Microsoft Visual C++) __Write a looping code segment that inputs up to 20 integerscores from file indata and outputs their average. If the filecontains fewer thatn 20 scores, the additional numbers should beignored. Be sure to consider what happens if the file isempty. Course (Programming and problem solving with c++, introcourse) HW problem, need help (using Microsoft Visual C++) __Write a looping code segment that inputs up to 20 integerscores from file indata and outputs their average. If the filecontains fewer thatn 20 scores, the additional numbers should beignored. Be sure to consider what happens if the file isempty.
Explanation / Answer
please rate - thanks #include #include using namespace std; int main() {int max=20,count=0,sum=0,num; ifstream input; input.open("input.txt"); input>>num; while(input&&count>num; } if(count>0) cout