1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mumz [18]
3 years ago
11

Write a for loop to print all NUM_VALS elements of vector courseGrades, following each element with a space (including the last)

. Print forwards, then backwards. End each loop with a newline. Ex: If courseGrades = {7, 9, 11, 10}, print:7 9 11 10 10 11 9 7 Hint: Use two for loops. Second loop starts with i = NUM_VALS - 1.#include using namespace std;int main() {const int NUM_VALS = 4;int courseGrades[NUM_VALS];int i = 0;courseGrades[0] = 7;courseGrades[1] = 9;courseGrades[2] = 11;courseGrades[3] = 10;//Your solution goes here
Computers and Technology
1 answer:
expeople1 [14]3 years ago
6 0

Answer:

#include <iostream>

using namespace std;

int main()

{

int courseGrades [ ] = {7, 9, 11, 10};

for(int i =0; i<4; i++){

       cout<<courseGrades[i]<<" ";

}

for(int j = 3; j>=0; j--){

   cout<<courseGrades[j]<<" ";

}

}

Explanation:

Using C++ programming language

Create the array vector and assign values with this statement int courseGrades [ ] = {7, 9, 11, 10};

The first for loop prints the values from 0-4 (Since four values are given and hard coded) for(int i =0; i<4; i++)

The second for loop prints from the last to the first element (i.e reversed) for(int j = 3; j>=0; j--)

You might be interested in
PLEASE HELP WILL MARK BRAINLIEST ASAP
Charra [1.4K]

Answer:

This is a heading

Explanation:

This is a paragraph does not exist. You would simply use p for paragraph. Therefore This is a heading is the correct answer.

8 0
3 years ago
Give four characteristics of hard disk​
Lubov Fominskaja [6]

Answer:

1. Mass Storage Devices

2. Available Storage Space

3. Data Access Performance

4. Device Form Factor and Connection

3 0
3 years ago
The view of a presentation can be changed on the View tab or by selecting the appropriate icon on the _____.
ELEN [110]
The answer is Status bar 

Hope my answer Helps! :)
7 0
3 years ago
Read 2 more answers
A word or line of a paragraph at the bottom of the page indent is called _______
sashaice [31]

Answer:

Orphan

Explanation:

                               Orphan may be defined as the term given to a word or a line of a paragraph that is alone at the bottom of a page .

                              It is a  paragraph-opening sentence or word appearing  at the bottom of a column or page by itself,and it remain separated from the remaining text or paragraph.

                              Orphans and widows are not desirable and must be avoided while writing text.

Thus the answer is Orphan.

5 0
3 years ago
Read 2 more answers
What is the other name designated to a game master of multiplayer online games (MMOs)?
kari74 [83]

Answer: b. expert

Explanation: generally game masters have more experience than most other players and help moderate the game.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Ping pc-b from a command prompt window on pc-a. were the pings successful? why?
    11·1 answer
  • What is computer hacking? describe some examples
    6·1 answer
  • When examining the digital evidence, what stage deals with using keyword searches and file-carving utilities to locate data that
    5·1 answer
  • (1 consider the following function definition: int func(int x, double y, char u, string name { //function body } which of the fo
    7·1 answer
  • Write the header file Stadium.h for a Stadium class. The Stadium class has the following data members: 1) an array of 1000 Seat
    7·1 answer
  • How to be fluent in computer
    10·2 answers
  • The range of a finite nonempty set of $n$ real numbers $S$ is defined as the difference between the largest and smallest element
    15·1 answer
  • Meta is a penetration testing engineer assigned to pen test the security firm's network. So far, she cannot tunnel through the n
    12·1 answer
  • Which popular video game franchise has released games with the subtitles World At War and Black Ops?
    10·2 answers
  • What are the six primary roles that information system play in organizations? How are information system used in each context
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!