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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Howard is designing a chair swing ride. the swing ropes are 5 meters long, and in full swing they tilt in an angle of 29° outside chairs to be 2.75 m above the ground in full swing.
Answers: 1
question
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
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
question
English, 17.12.2020 01:00
question
Advanced Placement (AP), 17.12.2020 01:00
question
Mathematics, 17.12.2020 01:00
question
Mathematics, 17.12.2020 01:00
question
Biology, 17.12.2020 01:00
question
Physics, 17.12.2020 01:00
Questions on the website: 13722361