|
What are the three types of loops? A good answer might be:
| ||||||||
Three Techniques for File InputInput from a file is usually done inside a loop that (in general) looks like this:
Other than the fact that there is an input statement in its body,
this is an ordinary loop.
Depending on the details of how it is implemented,
it can be any of the three types of loops.
Here is how the three types of loops are used for input loops:
The most common input loops are the first two. Here is a typical file input problem: Write a program to add up all the integers in a file except the first integer in the file which will be the count of how many integers follow. | ||||||||
QUESTION 2:What type of loop do you think will be used? Click Here after you have answered the question |