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
Write a short essay on the importance of information and communication technology (ICT) in the AFN industry. Add suitable exampl
AURORKA [14]

Answer:

computer

Explanation:

is an ICT device that help and makes things or work easy

6 0
3 years ago
How many answers do you need to be able to write messages on here??
Kipish [7]

1,000

Hope this helps!



~Courtney

3 0
3 years ago
How technology bacome the mode of revealing​
maria [59]

Answer:

afefdasf

Explanation:

3 0
3 years ago
What year did apple computer introduce the first ipod?.
Lady bird [3.3K]
Apple first released the first ipod in 2001
8 0
2 years ago
If you're under 18 and you receive _____ or more license points in 12 months, you'll be restricted to driving only to school or
IRISSAK [1]

Answer:

B:6

Explanation:

FLVS :)

6 0
3 years ago
Other questions:
  • Exit network systems, information support, and software development are all careers in which career cluster?
    10·1 answer
  • A job posting is the best way to find out what _____ are required for a position.A.aptitudes B.hard skills C.soft skills D.dress
    10·2 answers
  • Casual or informal group meetings are common. Here youcasually chat over tea, meet after work, or get together for purelysocial
    5·1 answer
  • What might a programming prefer the top-down approach to programming design?
    10·1 answer
  • Can a computer will work more efficiently if you perform disk optimization
    9·1 answer
  • Select the correct answer.
    15·1 answer
  • Write Album's PrintSongsShorterThan() to print all the songs from the album shorter than the value of the parameter songDuration
    14·1 answer
  • Why is it important to isolate evidence-containing devices from the internet?
    11·1 answer
  • What is a zerø-day exploit? No go.ogle &gt;:(
    10·1 answer
  • When you insert a new slide in a presentation, where is it placed in relation to the existing slides?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!