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
Why is dark supereffective against ghost?
Mice21 [21]

Answer:

hmmmmm...hold up let me look up what dark supereffective means XD...

Explanation:

?oh so i only see stuff about pokemon so id imagine its about that...

4 0
3 years ago
Read 2 more answers
Write at least complete set of HTML code to hyperlink to “Home.html”..
faltersainse [42]

Answer:

HTML Link Colors

By default, a link will appear like this (in all browsers):

An unvisited link is underlined and blue

A visited link is underlined and purple

An active link is underlined and red

You can change the link state colors, by using CSS:

8 0
3 years ago
Create a TicTacToe class that initializes a 3x3 board of "-" values. We will use this class in future exercises to fully build o
kap26 [50]

Answer:

public class TicTacToe //Defining TicTacToe class

{

char board[3][3] ; //Creating a 2D array instance variable

TicTacToe() //Constructor to initialize the array with " - "

{

for( int i = 0;i<3;i++) //Loop for the row of array

{

for(int j = 0;j<3;j++) //Loop for the column of array

{

Board[i][j] = '-'; //Assigning "-" in each cell

}

}

}

public char getter() //Defining getter() method to return the array

{

return Board; //returning the array

}

}

8 0
3 years ago
What is the range for copper tape
jeyben [28]

Answer:

I like the song "Angel"

3 0
3 years ago
The purpose of an Internet _____ is to receive packets and send them along towards their final destination.
Bumek [7]

The tool that receives packets and send them along towards their final destination is; Internet Server

<h3>Internet Servers</h3>

We are told that the tool is used to receive packets and send them along towards their final destination.

  • Now, the tool is an internet server because internet servers are softwares and hardwares that make use of HTTP and other protocols to respond to client requests that are made over the World Wide Web.

Now, the main job of an internet server is to display website content through storing, processing and delivering webpages to the final destination.

Read more about internet server at; brainly.com/question/20602197

7 0
3 years ago
Other questions:
  • Write an interactive Python calculator program. The program should allow the user to type a mathematical expression, and then pr
    13·1 answer
  • You maintain an RODC running Windows Server 2012 R2 at a branch office, and you want Juanita, who has solid computer knowledge,
    13·1 answer
  • So how do I repost a answer that I already answered to a question because I answered this question but later it told me to repos
    14·1 answer
  • ____ allows you to control how objects enter, move on and exit slides
    13·2 answers
  • A provides legal protection for something an individual has created
    12·1 answer
  • Which communication technology should you use if you need to connect three offices which are all within 3 miles of each other at
    6·1 answer
  • What is the model for 2017 Ford Mustang v6
    15·1 answer
  • what will allow you to immediately exit the program without rebooting the computer, when you realize your browser is not respond
    7·1 answer
  • What are some positive and nevative aspects of technology?
    11·1 answer
  • Which generation of computer is most popular and why?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!