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 alliteration?
what similarities do democracy and monarchy have? becuase im doing a venn diagram.
Prove the following identity :Sin α . Cos α . Tan α =  (1 – Cos α)  (1 + Cos α)
A particular circle in the standard (x,y) coordinate plane has an equation of (x − 5)^2 + y^2 = 38. What are the radius of the circle, in coordinate units, and
the point P divides the join of (2,1) and (-3, 6) in the ratio  2:3. does P lie on the line x-5y+15=0?PLEASE ANSWER FAST IT IS KINDA URGENT...
For all nonzero real numbers p, t, x, and y such that x/y = 3p/2t, which of the following expressions is equivalent to t ? F. y /2 G. 3px /2y H. 6py /x J. 3py /
please help what Is the Torah?
How do I solve n^2-5n-14=0 by factoring
How much water should be added to 18ml of 10% alcohol solution  to reduce to reduce the concentration to 9%
the himalaya mountains were formed in a collision at a A. fracture zone B. transform C. convergent D. divergent