Design an algorithm that does the following: Opens the number_list.dat file that
ID: 3555683 • Letter: D
Question
Design an algorithm that does the following:
Opens the number_list.dat file that wascreated by the algorithm created in the previous question(Algorithm 10.3), reads all of the numbers from the file anddisplays them, and then closes the file.
This is my version of the program. Confirm open for reading format is correct. Should I be looking for the counter in the file being read and then copy it to number for display.
Design an algorithm that does the following: opens the number_list.dat file reads all the numbers, displays them and closes the file.
Declare Integer counter = 1
Declare Integer number=0
Open numberFile
Explanation / Answer
Dear,
The given algorithm doesn't require the second condition counter<=100 as the logic needs to display all numbers in file.
Declare Integer counter = 1
Declare Integer number=0
Open numberFile
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.