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 includes two or more private, public, or community clouds, but each cloud remains separate and is only linked by technology
AURORKA [14]

Answer:

Hybrid cloud.

Explanation:

Hybrid cloud includes an IT architecture of two or more private, public, or community clouds, but each cloud remains separate and is only linked by technology that enables data and application portability.

Organizations that use hybrid cloud are usually more flexibile to choose the best cloud for each application and at such meeting their objectives effectively and efficiently at little cost.

3 0
3 years ago
Usually, in organizations, the policy and mechanism are established by the:
Ivanshal [37]

Answer:

Sorry Sorry Sorry

Explanation:

Sorry Sorry Sorry

5 0
3 years ago
Read 2 more answers
In the relocatable dynamic partitions scheme, the Memory Manager relocates programs to gather together all of the empty blocks a
kodGreya [7K]

Answer:

True

Explanation:

In computer, Memory management is a form of resource management, its essential requirement is to provide ways to dynamically allocate portions of memory to programs at their request, and to free it to be used again when not needed. Memory management is critical to any advanced computer system that uses more than a single process.

Several methods that has increased effectiveness of memory management like the Virtual memory systems which separates the memory addresses used by a process from actual physical addresses, thus allowing the separation of processes and increasing the size of the virtual address space beyond the available amount of Random Access Memory (RAM) using paging or swapping to secondary storage have been used.

"The Memory Manager relocates programs to gather together all of the empty blocks and compact them to make one block of memory large enough to accommodate some or all of the jobs waiting to get in from your question.

6 0
3 years ago
Why can’t web apps send notifications to a device’s taskbar when the app is closed?
tangare [24]
Web apps can't send notifications when it's closed because it is not installed into the device as a software program, meaning it doesn't have enough access to do so. Plus you are closing it down so how is something that you close down supposed to work?
8 0
4 years ago
Arpenet was the computer created by the military true or false
Sphinxa [80]

True. It was a project that the pentagon was working on in the 60's

3 0
3 years ago
Other questions:
  • Which type of multiple inheritance does Java support?
    15·1 answer
  • Which of the following are incorrect safety precautions for equipment operators? A. Drive equipment or vehicles on grades or roa
    7·2 answers
  • Write a program that reads from user (i) an hour between 1 to 12 and (ii) number of hours ahead. The program should print the ti
    15·1 answer
  • Question 14 (3 points)
    5·1 answer
  • in python Write a loop that counts the number of lowercase characters that appear in the string referenced by mystring.
    11·1 answer
  • After Brooke has helped Simon to resolve his original problem, Simon asks her about another linked workbook he has received. The
    7·1 answer
  • What type of data would a RDBMS store in a linked list, two-way linked list, or B-trees? What are the advantages and disadvantag
    5·1 answer
  • Create a basic program that accomplishes the following requirements: Allows the user to input 2 number , a starting number x and
    12·1 answer
  • Transitive spread refers to the effect of the original things transmitted to the associate things through the material, energy o
    6·1 answer
  • Q) Look at the code sequence and select the correct output
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!