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
Natali5045456 [20]
3 years ago
13

Assume you have a int variable n that has already been declared and initialized. Its value is the number of integers that need t

o be read in from standard input and printed out in sorted (ascending) order, each on a line by itself. Furthermore, there are no duplicates in the input and every number to be read is a non-negative value that is less than n's value. In this exercise you may not use any array (or fancy STL collection such as a vector). You may declare a variable or two as needed. With these restrictions, read the n values and print them out as required onto standard output.
Computers and Technology
1 answer:
Aleks [24]3 years ago
5 0

Answer:

/*This program is in c++*/

# include<iostream>

#include<stdio.h>

using namespace:; std;

int main()

{

 int n, a[20]; /* n can be maximum 20*/

 cout<<"Enter the value of n";

 cin>>n;

 For (int i=0;i<=n;i++)

{

  cout<<"The number must be less than"<<n;

  cin>>a[i];

}

int k=a[0];

for(int j=0;j<=n;j++)

{

   if(a[i]<k)

     {  

          a[i];=k

         k=a[i];

     }

     else

     {

          continue;

      }

}

cout<<"The numbers in ascending order are:";

for{int m=0;i<=n;i++)

{

    cout<<"a[i];

}

return 0;

}

         

Explanation:

The program is self explanatory.

You might be interested in
What does a proxy server do?<br> Help please!!
Svet_ta [14]

Answer:

A proxy server acts as a gateway between you and the internet. It's an intermediary server separating end users from the websites they browse. Proxy servers provide varying levels of functionality, security, and privacy depending on your use case, needs, or company policy.

5 0
3 years ago
G The method of mapping where each memory locationis mapped to exactly one location in the cache is
Otrada [13]

Answer:

Direct Mapped Cache

Explanation:

Given that a Direct Mapped Cache is a form of mapping whereby each main memory address is mapped into precisely one cache block.

It is considered cheaper compared to the associative method of cache mapping, and it is faster when searching through it. This is because it utilizes a tag field only.

Hence, The method of mapping where each memory location is mapped to exactly one location in the cache is "Direct Mapped Cache"

4 0
3 years ago
Respond to the following in three to five sentences. Select one netiquette guideline. Explain how this helps you draft more effe
slamgirl [31]

Answer:

Keeping as few emoji's as possible. This helps because lots of emoji's can make things confusing and/or annoying. This just means being kind to the person you're messaging and not making things confusing.

8 0
3 years ago
To create a link that starts an email, you code the href attribute as ________________________ followed by the email address.
timofeeve [1]
Mailto, followed by the email address.

E.g.: <span><a href="mailto:[email protected]">Mail me!</a></span>
5 0
3 years ago
A large multinational client has requested a design for a multi-region database. The master database will be in the EU (Frankfur
12345 [234]

Answer:

RDS with cross-region Read Replicas

Explanation:

The Amazon Web Service, popularly known as the AWS is a subsidiary company of the Amazon.com which provides various cloud computing platforms on demand and Application Programming Interface or the API to other companies, governments and individuals.

The Amazon web services provides an effective RDS. RDS stands for Relational Database Service. The Amazon RDS is used to set up as well as operate and scale relational database in cloud. It provides resizable capacity and cost effective database.

In the context, Amazon Wen Services  can deliver RDS with cross regional Read Replicas.

4 0
3 years ago
Other questions:
  • A client has macular degeneration resulting in moderate visual impairment. The client works as a data entry clerk and wants to c
    15·1 answer
  • A program called the ______ combines the object program with other programs in the library and is used in the program to create
    5·1 answer
  • First write a method to calculate the greatest common divisor (GCD) of two positive integers using Euclid’s algorithm (also know
    10·1 answer
  • Use the following global structure declaration as an example only. You will need to create your own data structure based on a da
    5·1 answer
  • What is blockchain? How it works? I heard bitcoin uses it.
    8·1 answer
  • What is the advertising photographer’s main objective in creating an image?
    11·1 answer
  • How does the Rights Management Services feature help to protect information
    11·1 answer
  • What kind of attack allows for the construction of LDAP statements based on user input statements, which can then be used to acc
    7·1 answer
  • If a system contains 1,000 disk drives, each of which has a 750,000- hour MTBF, which of the following best describes how often
    15·1 answer
  • How does social network use message to entertain?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!