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
Which is the correct description of the first act in a classical game story structure?
Reil [10]
The 3-act structure<span> is an old principle widely adhered to in storytelling today. It can be found in plays, poetry, novels, comic books, short stories, video games, and the movies. It was present in the novels of Conan Doyle, the plays of Shakespeare, the fables of Aesop, the poetry of Aristotle, and the films of Hitchcock. It’s older than Greek dramaturgy. Hollywood and Broadway use it well. It’s irrefutable and bullet-proof, so to speak.

so this means its more basic antagonist protagonist set-up even if the protagonist and antagonist are "CUBES"</span>
5 0
4 years ago
The Department Manager researches new data platforms for the company and requests a list of essential features. Which essential
Ipatiy [6.2K]

Answer:

Centralisation

dashboard , programmatic access

Explanation:

hope it helps u

mark me as brainlist

4 0
3 years ago
when a user has the requirement to stay connected 100% of the time as they move throughout the WLAN coverage area, what are they
zimovet [89]
They are concerned about many things
5 0
3 years ago
Do my Twitter posts count as opinions or facts?
elena55 [62]
They count as opinions
6 0
3 years ago
Read 2 more answers
A company wishes to begin the process of implementing a multi-party system and is looking for other companies with similar inter
Andre45 [30]

If a company wishes to begin the process of implementing a multiparty system using block-chain, this provides Trust among the organizations.

<h3>What is a block chain?</h3>

A block chain is a listing of records referred to as blocks. Cryptography is used to link the blocks collectively.

Beginning a process of implementing a multi-party system provides trust among the organization, and not ownership, intent or uniqueness.

Read more about <em>systems </em>here:

brainly.com/question/14364696

7 0
2 years ago
Other questions:
  • Jim has entered the age of each of his classmates in cells A1 through A65 of a spreadsheet. Which function should Jim use to fin
    11·2 answers
  • Create a class named Person that holds the following fields: two String objects for the person’s first and last name and a Local
    5·2 answers
  • Social networking sites like Office Online, PayPal, and Dropbox are used to develop social and business contacts.
    6·2 answers
  • In a student​ database, a row that describes the top​ student, including his or her​ lastname, firstname, and​ studentnumber, is
    9·1 answer
  • What is called photo and video edition?
    8·1 answer
  • What does the presence of the cydia app on an ios device indicate?
    14·1 answer
  • What did Charles Babbage design in 1822 to substitute values in polynomial equations? ENIAC TRADIC Analytical Engine Difference
    6·1 answer
  • Which of these is the largest?<br> terabyte<br> exabyte<br> gigabyte<br> kilobyte<br> PLEASE HELP
    5·1 answer
  • If you need seamless access to the OS, ________ is better.
    8·1 answer
  • Plz tell the answer I I'll mark u as the brainliest
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!