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

The answer to this question
6ft-9 inches to decimal feet
A 2 kilogram object is moving horizontally with a speed of 4m/s. How much net force is required to keep the object moving at this speed and in the direction?
how did germanic peoples organize Europe politically after the end of the western roman empirea.)into many kingdomsb.)into modern nationsc.)into scattered villa
The hottest part of the Earth is the inner core outer core mantle crust
Rob walked 2/10 block. Drew walked 5/10 block. Write a comparison for the distance Rob and Drew each walked.
Jin ran 15.2 miles over the weekend. He ran 6.5 miles on Saturday. How many miles did he run on Sunday?
Consider this reaction: 2SO2 (g) + O2 (g) 2SO3 (g) + heat. What will happen if more sulfur trioxide gas is added to the reaction mixture? A-The equilibrium w
Where would a tundra biome be located? a. south america b. africa c. australia d. canada?
a.Virchow hypothesized that cells divide to form new cells. b. Hooke gave the name "cells" to the little boxes he saw under magnification. c. The first microsc