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
Just take points, this website is so weird because of all the reporting and I didn't do any thing
krok68 [10]

Answer:

I agree with you! And thank you for the points

Explanation:

I answer educational questions and ask one of my own regarding math and it gets reported

Someone asked if their art was good and how they can improve it and it gets reported

But the only questions they don’t report are free po!nts

For the people who don’t have anything better to do then report people trying to get help: STOP ITS ANNOYING NOT JUST FOR ME BUT THE PEOPLE WHO ARE TRYING TO GET HELP, INSTEAD OF REPORTING WHY DONT U HELP PEOPLE???

7 0
2 years ago
Read 2 more answers
Given a floating-point formal with a k-bit exponent and an n-bit (fraction, write formulas for the exponent E, significant M, th
ANEK [815]

Answer:

A) Describe the number 7.0 bit

The exponential value ( E ) = 2

while the significand value ( M ) = 1.112  ≈ 7/4

fractional value ( F )  = 0.112

And, numeric value of the quantity ( V )  = 7

The exponent bits will be represented  as :  100----01.

while The fraction bits will be represented  as : 1100---0.

<u>B) The largest odd integer that can be represented exactly </u>

The integer will have its exponential value ( E ) = n

hence the significand value ( M )

=  1.11------12 = 2 - 2-n

also the fractional value ( F ) =  

0.11------12 = 1 – 2-n

Also, Value, V = 2n+1 – 1

The exponent bits  will be represented  as follows:  n + 2k-1 – 1.

while The bit representation for the fraction will be as follows: 11---11.

<u>C) The reciprocal of the smallest positive normalized value </u>

The numerical value of the equity ( V ) = 22k-1-2

The exponential value ( E )  = 2k-1 – 2

While the significand value ( M )  = 1

also the fractional value ( F ) = 0

Hence The bit representation of the exponent will be represented as : 11---------101.

while The bit representation of the fraction will be represented as : 00-----00.

Explanation:

E = integer value of exponent

M = significand value

F = fractional value

V = numeric value of quantity

A) Describe the number 7.0 bit

The exponential value ( E ) = 2

while the significand value ( M ) = 1.112  ≈ 7/4

fractional value ( F )  = 0.112

And, numeric value of the quantity ( V )  = 7

The exponent bits will be represented  as :  100----01.

while The fraction bits will be represented  as : 1100---0.

<u>B) The largest odd integer that can be represented exactly </u>

The integer will have its exponential value ( E ) = n

hence the significand value ( M )

=  1.11------12 = 2 - 2-n

also the fractional value ( F ) =  

0.11------12 = 1 – 2-n

Also, Value, V = 2n+1 – 1

The exponent bits  will be represented  as follows:  n + 2k-1 – 1.

while The bit representation for the fraction will be as follows: 11---11.

<u>C) The reciprocal of the smallest positive normalized value </u>

The numerical value of the equity ( V ) = 22k-1-2

The exponential value ( E )  = 2k-1 – 2

While the significand value ( M )  = 1

also the fractional value ( F ) = 0

Hence The bit representation of the exponent will be represented as : 11---------101.

while The bit representation of the fraction will be represented as : 00-----00.

8 0
3 years ago
Toshiba Corporation makes computer chips. Toshiba Corporation would be classified as a A. merchandising company. B. manufacturin
solmaris [256]

Answer: Option 'B'

Explanation: They will be referred to as a manufacturing company because of they make the necessary part themselves not buy it from somewhere else.

5 0
3 years ago
Melanie needs to ensure that readers are able to locate specific sections within a document easily. What should she include in t
kozerog [31]

Answer:

in this case is table of contents

Explanation:

If Melanie want to organize the content, she can use index or table of content, but for specific sections table of content is easier to use.

For example:

Melanie can organize the titles in different levels like subtitle at the same page.

1 History..................................1

1.2 USA History....................1

 1.3 California History..........1

Melanie have to mark every title and subtitle in the document like "History -title 1", "USA History - title 2", "California History - title 3".

Melanie can create the table on content automatically in Word: at the section -> Reference -> table of content.

Readers can locate every important section by page, title and subtitle.

5 0
3 years ago
Read 2 more answers
Steve wants to become a successful graphic design entrepreneur. Which entrepreneurial approach will help him succeed? A. working
andreyandreev [35.5K]

Answer: A.  working as a graphics artist

Explanation: None of the others are specifically what he wants.

4 0
2 years ago
Other questions:
  • On a spreadsheet, this is the term for a grouping of cells that touch each other and form a rectangle. An example of it would be
    13·1 answer
  • If you sort by Last Name, Ascending, which of the following last names would come first in the list?
    12·1 answer
  • Although the Earth's crust formed relatively early in the Earth's history, it was not present when the Earth first began to form
    12·2 answers
  • A mobile device is freezing almost daily. The device remains powered on and the screen illuminated. The user restarts the device
    8·1 answer
  • Assume n represents the number of inputs. The possible number of states within a truth table can be calculated using which of th
    10·1 answer
  • How to interchange first half of the array with second half of array in python?
    9·1 answer
  • Write a function that accepts an argument for a persons name. The method should loop through the number of characters in the nam
    7·1 answer
  • HELP PLSSSSS!!! I WILL MARK BRAINLIEST FOR THE FIRST AND CORRECT ANSWER!!!
    14·2 answers
  • 10010 - 1011 binary subtraction​
    5·1 answer
  • Help me help you............
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!