00:01
Okay, so in this question we have a skeleton c+ + program and we want to add some code so that it outputs the grades forwards and backwards.
00:16
So if i run this program without any modification, then i need to enter four grades.
00:23
So for example, if i use the test case, i write 7, 9, 11, and 10.
00:30
And then my program ends.
00:32
So basically i will run it again.
00:39
And here it's i declared a number of values that i want.
00:44
So four.
00:45
I enter the number.
00:47
I have an array with four grades entered as integer.
00:52
Then for one from zero to three.
00:56
So i will fill my array one by one.
00:59
I will have one.
01:01
And then that's now.
01:03
I is equal to 1 now i is equal to 2 and now i is equal to 3 and then i it becomes greater than 4 so i stop so in order to print the list forward i would need another 4 loop so it would be 4 then i could use another integer integer j is equal to 0 j would be lesser than non -vales so the number of values i can use plus plus j to be constant with what's written before and here instead of c -in i would use c -out so c in allows us to take input while c -out allows us to take to have some output so i would have course grade j instead of i and i would need a space between the characters.
02:20
So here i would need to add simply an empty space like this...