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
Windows pe includes networking components and allows you to use current windows drivers for network connectivity.
4vir4ik [10]
Indeed it is very true
4 0
3 years ago
Write an algorithim and flowchart to check it the temperature is more than 25°. If it more than 25°C switch fan on else off.​
Marianna [84]

Answer:

write the sly flowchart

Explanation:

#stdlib.etc

main()
{

    int temp;
    bool fan = false;

    print("enter the frigin temperature: ");

    read(temp);

    if (temp > 25)

     {
         fan = true;
         print("the fan is on");
     }
     else
      {

           print("the fan is off");

      }

      return 0;

}

8 0
2 years ago
What is the impact of Customer Centricity?
skad [1K]
Customer-centric businesses generate greater profits, increased employee engagement, and more satisfied customers. Customer-centric governments and nonprofits create the resiliency, sustainability, and alignment needed to fulfill their mission.
5 0
2 years ago
How can you add contrast between text and headlines in a document? increase the font size of the headline make the headline long
Pavlova-9 [17]
Increase the font size and make the headline bold
8 0
3 years ago
1. You have just finished installing a network adapter and booted up the system, installing the drivers. You open File Explorer
e-lub [12.9K]

Answer:

Check network discovery settings, check file sharing and firewall settings.

Explanation:

The first thing to check would be if the computer has network discovery active. Otherwise, even with a valid and working NIC, you won't be able to see it in any other computer across the network.

If that option is active, and the computer is not showing up, you can check the firewall settings, and if it's preventing you from accessing the network.

A third thing you could check on would be if the 2 computers are connected over wifi, you can try plugging them both via ethernet cable to your router, and test if there is an issue with wireless connectivity.

8 0
3 years ago
Other questions:
  • Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
    7·1 answer
  • You are performing a manual WLAN RF site survey in a location that has several long hallways with small offices on both sides. Y
    8·1 answer
  • When should you update your Transaction Register? Every time you make a transaction Daily Weekly Monthly
    6·1 answer
  • Your company has an external database of payment information that they wish to populate in Salesforce. They have decided to use
    13·1 answer
  • What will the following segment of code output?
    7·1 answer
  • If you're under 18 and you receive _____ or more license points in 12 months, you'll be restricted to driving only to school or
    11·1 answer
  • Difference between Hard copy and Soft copy?​
    13·1 answer
  • Select the correct answer
    5·2 answers
  • Felicity wants to capture the attention of the regular subway commuters in her area though her print advertisements​
    13·1 answer
  • Which of the following is/are used in multimedia?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!