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
Aleksandr [31]
4 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 fewer than 20 integers.
Computers and Technology
1 answer:
Artemon [7]4 years ago
8 0

Answer:

The program to this question can be described as follows:

Program:

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

int main() //defining main method

{

const int total_number= 20; //defining integer constant variable

int a[total_number],i; //defining integer array and variable  

printf("Enter total number, that you want to insert in list: "); //message  

scanf("%d",&a[0]); //input value by user

printf("Input list: "); //message

for(i=1;i<=a[0];i++) // loop for input value

{

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

}

printf("List in reverse order:\n");

for(i=a[0];i>0;i--) //loop for print list in reverse order

{

printf("%d ",a[i]); //print value

}

return 0;

}

Output:

Enter total number, that you want to insert in list: 5

Input list: 6

4

2

8

1

List in reverse order:

1 8 2 4 6  

Explanation:

In the above C language program, three integer variable "total_number, a[], and i " is declared, in which total_number is a constant variable, that holds value 20, which is passed in an array, in array first element we input the total number of the list.

  • In the next step, an array variable is used, that uses for loop to input number in list.  
  • Then another for loop is declared that prints the array value in its reverse order, with a white space.
You might be interested in
Provides images of weather systems, and helps to track storms at different altitudes
olasank [31]
A weather satellite is used to monitor weather systems and the climate of the earth. Weather satellites have two types orbits. They can either have near-polar orbit or geostationary orbit. The former has lower altitudes and covers the complete Earth. The latter, on the other hand, stays put in one spot, and is found in higher altitudes.
6 0
4 years ago
Given the int variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another int variable m
Marysya12 [62]

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

   int x=5,y=2,z=9;

   int min;

   // find the smallest value and assign to min

   // if x is smallest

   if(x < y && x < z)

   // assign x to min

    min=x;

     // if y is smallest

else if(y < z)

 // assign y to min

    min=y;

// if z is smallest

else

 // assign z to min

    min=z;

// print the smallest

cout<<"smallest value is:"<<min<<endl;

return 0;

}

Explanation:

Declare and initialize variables x=5,y=2 and z=9.Then check if x is less than y and x is less than z, assign value of x to variable "min" .Else if value of y is less than value of z then smallest value is y, assign value of y to "min".Else z will be the smallest value, assign its value to "min".

Output:

smallest value is:2

6 0
3 years ago
Help ASAP!!! During which phase of a well-structured study session is each occurring?
gladu [14]

Answer:

1. drill

2. discuss

3. review

4. prepare

Explanation:

Your Welcome!

7 0
3 years ago
Read 2 more answers
This is your code.
MAVERICK [17]

Blue

Explanation:

Because the row is 1 and the column in 2.

5 0
3 years ago
Read 2 more answers
In a computerized accounting system, each transaction that is analyzed must be entered by hand into the appropriate journal and
tatuchka [14]

Answer:

False

Explanation:

An effective financial management system is based on the availability of reliable, accurate and timely financial data. Usually this data is provided by the accounting system of an organization. In response to factors such as expansion, new reporting requirements, the need to work towards greater self-sufficiency and the availability of relatively low cost technology, an increasing number of organizations are adopting computerized accounting systems that they will provide the data they need, at the time they need it.

Most organizations go through a progression of accounting systems. They usually start with a manual system (using paper), then advance to a mix of paper and tools based on computerized spreadsheets, and finally adopt a simple computerized system.

5 0
4 years ago
Read 2 more answers
Other questions:
  • Brenda is a college student who enjoys downloading music, movies, and television shows from the Internet. She also uses the Inte
    7·1 answer
  • What makes sqlite an appropriate choice for an android application, compared to other relational database management systems, su
    15·1 answer
  • Write a C program that reads a string containing text and nonnegative numbers from the user and prints out the numbers contained
    6·1 answer
  • The software program you need to have to read PDF file, such as the PDF files you download from your My Courses page, is
    9·2 answers
  • How do i convert videos on the computer
    10·1 answer
  • When you hear the word "automation" what comes to mind?
    6·1 answer
  • Which among the following if absent, a computer is not complete.
    6·2 answers
  • Write any two web browers​
    10·1 answer
  • Helen is working on her colleague’s photos. She came across this particular photo and was confused about which effect the photog
    15·2 answers
  • PLEASE HELP!!!
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!