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 shoul i get, Airpods or a ps4 cooling fan ???
Fynjy0 [20]

Answer:

Airpods, there is ps5 coming out

Explanation:

3 0
3 years ago
Read 2 more answers
For each recursive call, display the outputs on a separate line and add a level of indentation. do your utmost to make the outpu
Daniel [21]
I  dont understand the question 
8 0
3 years ago
On Sarah’s first day at work she is provided with a range of information technology that she can use to write , edit or create d
Kay [80]

1 Word processing software: are digital versions of the manual typewriter and can be used to write, edit, print and perform various modifications to a document

2 Electronic mail: helps to exchange messages and share pictures, data files and audio and video clips

3 Presentation software: helps to inform or demonstrate an idea in the form of a slide show using images or presentation graphics

4 Spreadsheet software: are digital versions of the paper based accounting sheets used to share, organize and manipulate data

5 Database software: are tools that store large quantities of related data and information

Let me know if you have any questions.

7 0
3 years ago
Read 2 more answers
Which of the following domestic appliances does not use a magnet?
alekssr [168]
Pressing iron isn’t domestic appliances
7 0
3 years ago
Read 2 more answers
WHAT BIRD IS SHOWN ON THE ARM OF BLOODHOUND?
ruslelena [56]

Answer:

Looks like a raven to me

Explanation:

4 0
4 years ago
Read 2 more answers
Other questions:
  • Why is it helpful hat the ribbon tabs can collapse
    10·1 answer
  • With a(n) ____ the editor, compiler, and executer are combined in the same application.
    7·1 answer
  • On most computers, the default font size in word is ____. 8 11 14 16
    8·2 answers
  • Write a fragment of code that will read words from the keyboard until the word done is entered. For each word except done, repor
    14·1 answer
  • In 2-5 sentences, explain how columns can be used and set up to increase the effectiveness of business documents.
    11·1 answer
  • Which line of code will print Python is cool! on the screen?
    9·2 answers
  • To record your own audio, you must have _____.
    14·2 answers
  • How do I change my name on my Brainly Profile?
    15·2 answers
  • _________________ component defines the correct granularity for access controls and oversees the relationships between identitie
    13·1 answer
  • Games set in modern times are less difficult to a tie to a specific culture than games set in past eras
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!