subject

[C++ for array week| First, make an array to use later in the pogram:
Array of ints of size 90 (not dynamic)
Init all values to 0 (that's the curly braces thing)
Loop through the array and set each value to a random number between 2 and 9
Print the array with a separate for loop. Put a space between each number
Now use that array to do the following:
Ask the user what index they want to change
If it is out of bounds, don't exit the program, just ask again.
Ask the user what the new value should be
Reprint the array
Keep doing this until they enter -1 for the index
Here's a super important point. Before you use the index they gave you, you must check to make sure it is not out of bounds on that array. Crashing is worse than being wrong.
Any crash or infinite loop automatically drops the grade two letters no matter how correct anything else is. In real life, if you make a mistake you can fix it in a patch. If your program crashes though, someone might die. Or worse yet, return your program so you don't get paid.
SP21: Give extra point for dynamic array

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 17:20, joshajgaa
Find the inverse function of f(x)= 1+squareroot of 1+2x
Answers: 2
image
Computers and Technology, 22.06.2019 11:00, abelxoconda
Which are examples of note-taking tools? check all that recording devices sticky notes digital highlighters paper flags highlighting pens digital displays digital flags
Answers: 1
image
Computers and Technology, 22.06.2019 22:40, ihatemylife0
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
image
Computers and Technology, 23.06.2019 04:31, mjweed3381
Cloud computing service providers manage different computing resources based on the services they offer. which resources do iaas and paas providers not manage? iaas providers do not manage the for the client, whereas paas providers usually do not manage the for their clients. iaas- storage server operating system network paas- applications interafce storage vertualiation
Answers: 2
You know the right answer?
[C++ for array week| First, make an array to use later in the pogram:
Array of ints of size...

Questions in other subjects:

Konu
Mathematics, 03.12.2020 03:30