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
Westkost [7]
3 years ago
10

Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicatin

g the number of integers that follow. For coding simplicity, follow each output integer by a space, including the last one. Assume that the list will always contain less than 20 integers.
Computers and Technology
1 answer:
kkurt [141]3 years ago
3 0

Answer:

The program to this question as follows:

Program:

#include <stdio.h> //header file.

int main() //main method.

{

const int size= 20; //define variable.

int a[size]; //define array

int i, n; //define variable

printf("Enter number of elements :"); //message.

scanf("%d", &n);//input size of array.

printf("Enter array elements :"); //message

for (i = 0; i < n; ++i) //loop

{

scanf("%d",&a[i]); //input array elements by user.

}

printf("Reverse order :\n");

for (i = 0; i < n; ++i) //loop

{

printf("%d ",a[n-i-1]); //print elements in reverse order.

}

return 0;

}

Output:

Enter number of elements :5

Enter array elements :5

4

3

2

1

Reverse order :

1 2 3 4 5  

Explanation:

The description of the above program as follows:

  • In the program firstly we include the header file and define a method that is "main method" in the method we define variables that are "size, n, i, and a[]".  The size variable is used to make a variable constant that means its value will not change in the program. We pass the size variable value to the array and use i variable for loop.
  • We use variable n and a[] for user inputs. In n variable, we input a number of elements to be inserted into an array and a[] we insert all array elements to insert these elements we use for loop.
  • Then we define another for loop in this loop we print all array elements in reverse order.
You might be interested in
Allison’s computer is displaying a strange error message saying that Allison, who is an administrator, does not have access to a
Margaret [11]

Answer:

restart computer,check to see who was last on her account or call a technician  

Explanation:

8 0
3 years ago
How does Virtual Reality help to make work experiences more inclusive?
FrozenT [24]

Answer:

It makes your brain work better and it's also fun.

Explanation:

The brain does not like just one thing it wants to have more experience.

7 0
2 years ago
How many times is the second for loop going to loop in this block of code? Write your answer in numeric form in the box provided
pantera1 [17]

Explanation:

The second for loop does 1 of 4 iterations for every 1 of 5 iterations of the parent loop. meaning it is 4 x 5 which is 20.

8 0
2 years ago
Match each of the following steps of SDLC development to its position in the development process.
Arisa [49]

Answer:

Step One - problem/opportunity identification  (V)

Step Two - Analysis (III)

Step Three - Design (II)

Step Four - Development (I)

Step Five - Testing and Installation (IV)

Explanation:

In the field of software development, or systems engineering, SDLC which refers to software development cycle refers to a systematic way of building software applications, it shows unique stages with the outcome of each stage dependent on the previous, step has a unique task which range from the planning, analysis, development, testing and installation of the information system.

5 0
3 years ago
How do you find the exterior angle measure of any regular polygon? (The degree in which to turn the turtle to draw a shape)
Diano4ka-milaya [45]

Answer:

360/number of sides

Explanation:

all the exterior angles add up to 360°

so to find each angle mesure, divide the 360 by the number of sides the figure has.

7 0
3 years ago
Other questions:
  • How does the team know what to work upon during the iteration
    6·1 answer
  • "Which of the following will help protect against a brute force attack?
    11·1 answer
  • Helppppppppppppppppppp
    11·1 answer
  • The section called Breaking Substitution Ciphers (p. 166) describes a "random substitution cipher," in which each letter of the
    11·1 answer
  • Suppose the file is sent continuously as one big message. how long does it take to send the file, assuming it is sent continuous
    15·1 answer
  • Question 16 of 20
    12·2 answers
  • While doing research on the Internet, what kind of website should you avoid because the information may be biased?
    11·1 answer
  • Consider the classes below: public class TestA { public static void main(String[] args) { int x = 2; int y = 20 int counter = 0;
    8·1 answer
  • My computer just fried anybody know why it did that?
    14·2 answers
  • Hey does anyone know the name of that movie where like this teenage girl is chilling at her house then there is an outbreak of s
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!