92.1k views
3 votes
Which type of loop would be most appropriate for solving the problem 'calculate the sum of all the odd integers in a data file of unknown length'?

User Moderat
by
7.6k points

1 Answer

6 votes
The answer is an EOF-controlled loop. In addition, a flag controlled loop or a sentinel controlled loop is a type of loop would be most for solving the problem print every other input character until the character @ is encountered. False2 if a termination condition of while loop becomes true in the middle of the loop body, in which the loop is exited immediately. 
User Omo
by
8.0k points

No related questions found