How to modify this code based on the information given: the array is supposed to
ID: 3658728 • Letter: H
Question
How to modify this code based on the information given:
the array is supposed to be initially loaded from a file (containing 4 33 25 68 50 30 63 47 54 86 82 71) 2) Consider the following execution:
Enter size of list: 20 Enter elements: 4 33 25 68 50 30 63 47 54 86 82 71
#include <cstdlib>
Explanation / Answer
{ // start main int list[20], i, n, index, ele; cout > n; cout list[i]; } If you are asking to load a list from a file then you should change the above code to: //Use this with the code: #include //Change like this: { // start main ifstream infile; infile.open("path to file"); int list[20], i, n, index, ele; cout > n; for (i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.