subject

Write a for loop to print all NUM_VALS elements of vector courseGrades, following each element with a space (including the last). Print forwards, then backwards. End each loop with a newline. Ex: If courseGrades = {7, 9, 11, 10}, print:7 9 11 10 10 11 9 7 Hint: Use two for loops. Second loop starts with i = NUM_VALS - 1.#include using namespace std;int main() {const int NUM_VALS = 4;int courseGrades[NUM_VALS];int i = 0;courseGrades[0] = 7;courseGrades[1] = 9;courseGrades[2] = 11;courseGrades[3] = 10;//Your solution goes here

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
What is stored in str after the following code executes? string str = "computer science"; int i = 0; while (i < 8) { if (str.indexof("m") < i) { str = str.substring(0, 2) + str; } i += 2; } computer science cocomputer science cococomputer science cocococomputer science computer scienceco
Answers: 3
question
Computers and Technology, 22.06.2019 14:30
Complete the sentence based on your knowledge of the professional difficulties faced by music artists. digital technology allows audiences to see free live telecasts of music or dance performances through
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
You know the right answer?
Write a for loop to print all NUM_VALS elements of vector courseGrades, following each element with...
Questions
question
Mathematics, 01.08.2019 19:00
question
Mathematics, 01.08.2019 19:00
Questions on the website: 13722359