DemonLeone6563 DemonLeone6563
  • 14-08-2020
  • Computers and Technology
contestada

cpp g Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards, then backwards. End each loop with a newline. Ex: If courseGrades

Respuesta :

wiitong0394703
wiitong0394703 wiitong0394703
  • 14-08-2020

Answer:

lol don't ask people to write code for you

assuming its an array, n is size.

normally:

for(int ele: courseGrades){

cout << ele <<" ";

}

cout << endl;

reverse:

reverse(courseGrades, courseGrades + n);

for(int ele: courseGrades){

cout << ele <<" ";

}

cout << endl;

Answer Link

Otras preguntas

What is the advantage of using an array of telescopes?
The aloe plant has thick, water-filled leaves covered with spikes. The flowers are high on a stalk, so that pollen can be quickly and easily released. What biom
how foes the volume of a sphere change if the radius is tripled
is conflicted a antonym for ulterior
Which of the following are ways to conserve resources? A. compost bins B. rain barrels C. solar panels D. All of the above
which is more 2 feet or 1 yard
a pure substance that can't be broken down into simpler substances by chemical or physical means. A. chemical B. atom C. element D. mineral
By donating a treasured fossil to a specimen collection, a scientist is collaborating with other investigators. Which of the following best explains why this mi
What does the Harlem Renaissance reveal about African American culture in the 1920s
Your brother and ____ are going fishing saturday me myself him i