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
horsena [70]
3 years ago
5

Write an application that stores the following nine integers in an array: 10, 15, 19, 23, 26, 29, 31, 34, 38. Display the intege

rs from first to last, and then display the integers from last to first.
Computers and Technology
1 answer:
daser333 [38]3 years ago
7 0

Answer:

Following are the code to this question:

#include <iostream>// header file

using namespace std;

int main()//main method

{

int arr1[]= {10, 15, 19, 23, 26, 29, 31, 34, 38};//defining array of integer values

int i;//defining integer variable

cout<<" Array from first to last: ";//print message

for(i=0;i<9;i++)//use for loop to print array

{

cout<<arr1[i]<<" ";//print array value

}

cout<<"\n Array from last to first : ";//print message

for(i=9-1;i>=0;i--)//defining for loop to print array in reverse order

{

cout<<arr1[i]<<" ";//print array

}

return 0;

}

Output:

Array from first to last: 10 15 19 23 26 29 31 34 38  

Array from last to first : 38 34 31 29 26 23 19 15 10  

Explanation:

In the above-given code, an array "arr1" of an integer value is declared, that stores 9 elements, in the next step, an integer variable i is declared, that uses two for loop to print the value in the given order.

  • In the first for loop, it starts from 0 and ends when its value less than 9, and prints the array value.
  • In the second for loop, it starts from 9 and ends when the index value equal to 0, and prints the array value in reverse order.
You might be interested in
What is the value of: 1 + int(3.5) / 2?<br> Select one:<br> a. 2<br> b. 2.25<br> C. 2.5<br> d. 3
Drupady [299]

Answer:

C (2.5)

Explanation:

int(3.5) = 3

So, using order of operations, (3/2)+1=2.5

8 0
3 years ago
Which avenue may utilize video streaming, audio narration, print designs, and animation?
astra-53 [7]

Answer: is their any options to answer your question

Explanation:

4 0
3 years ago
Read 2 more answers
The type of code that uses eight bits for each character is ____.
Ksivusya [100]
It's Binary code simple as that its made of 8 1's and 0's
7 0
3 years ago
3. For “Incident Energy Analysis” What body parts are involved in the distance
krek1111 [17]

The body part that is close to the arc flash boundary is the energized conductors or circuit parts.

<h3>What is the distance of an arc flash?</h3>

The working distance is known to be the distance that exist between a person and the center of an arc flash.

Note that The body part that is close to the arc flash boundary is the energized conductors or circuit parts.

Learn more about Energy from

brainly.com/question/13881533

#SPJ1

7 0
2 years ago
The goal of quality assurance is toprovide management with the data needed to determine whichsoftware engineers are producingthe
Ymorist [56]
The answer to your question is true
8 0
3 years ago
Other questions:
  • Best value supply chains strive to excel along four measures: speed, quality, cost, and flexibility. Group of answer choices Tru
    10·1 answer
  • Greg works for an online games development company. He is not a net freak, but occasionally he visits online literature sites an
    7·1 answer
  • If you see an icon in a document preset that looks like a tiny web browser window, what type of document is the preset meant to
    13·1 answer
  • What is the meaning of ethics? Check all of the boxes that apply
    13·1 answer
  • A Silicon Valley billionaire purchases 3 new cars for his collection at the end of every month. Let a_n denote the number of car
    8·1 answer
  • Robert is leading a project online that includes students from different cultures. Two of the students spend most of the time li
    7·1 answer
  • In which of the security mechanism does the file containing data of the users/user groups have inbuilt security?
    6·1 answer
  • Which is an example of synchronous communication?
    9·2 answers
  • Every telecommunication setup uses two devices: one device to transmit data and one device to receive data. Which device transmi
    15·1 answer
  • How does naming affect a variable’s creation and use?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!