emary
| 423
ing
vector
elements
with
a
for
loop.
rte
afor
oopto
print
al
NUM_VALS
elements
of
vector
courseGrades,following
each
with
a
space
(inciuding
the
last).
Print
forwards,
then
back
jth
newine.
Ex.
If
courseGrades
=
7,
9,
11,
10},
print.
79110
L1197
Hint:Use
two
for
loops.
Second
loop
starts
with
|
=
courseGrades
size()
-
1
Note:
Tnese
activitiss
may
test
coge
with
different
test
values
This
(vectoreint>
courseGrades(4)).
See
ity
will
perform
two
tests,
both
with
a
4-¢lement
v
Also
rote:
If
the
submitted
code
has
errors,
the
test
may
generate
strange
results.
O
the
test
ma,
never
reached,
in
Wnich
case
the
system
dossn
print
the
test case
sh
and
report
Program
end
t
caused
the
reported
message.
7
Vet
wrseuraves
um_vacs
5
R
8
ot
5
1o
for
(i=9;
1<
coursesrades.size();
++1)
{
n
cin
>>
courseGrades.
3t(1);
1y
B
1
for
(1=
9;
1<
coursesrades.size();
++1)
{
15
cout
<
coursetrades.at()
<
°
16
17
cout
<
endl;
B
15
for
(i
=
coursesrades.size()
-1;
1
»
cout
<<
coursetrades.
at()
<<
2
2
cout
<<
endl;
2
retum
o
>
n
[
e
R