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
Ivan
4 years ago
13

Write a fragment of code that opens a file named numbers.txt, reads in pairs of number until end of file and sends the smaller o

f the two to a file named min.txt and the larger of the two to a file named max.txt (one number per line). You can assume there are no ties. (basic file input/output)
Computers and Technology
1 answer:
jok3333 [9.3K]4 years ago
8 0

Answer:

See explaination for code

Explanation:

int x, y;

ifstream numbers;

numbers.open ("numbers.txt");

ofstream min;

min.open ("min.txt");

ofstream max;

max.open ("max.txt");

while(numbers>>x>>y )

{

if(x>y)

{

max<<x<<endl;

min<<y<<endl;

}

else

{

max<<y<<endl;

min<<x<<endl;

}

}

numbers.close;

min.close;

max.close;

You might be interested in
Which type of element is , and what is the meaning of that element?
IrinaK [193]

Answer:

1. Semantic

2. modifies

Explanation:

Semantic HTML is understood by the traditional browser, and semantic tags are the one that ensures not just presentation, but also adds the meaning to the webpage. And hence, img here is both semantic as well as presentational. Hence, the first option is semantic. And the IMG modifies the meaning of the web page. The description is done by the text. And hence the second option is modified.

.

6 0
3 years ago
Which of the following statements about light emitting in diodes is correct
andriy [413]

<span>The options attached to the question above are as follows:</span>

<span>
A. Light-Emitting diodes are used as indicators in circuits

B. Light-Emitting diodes are used as defectors in circuits

C. Light-Emitting diodes have very short life-spans in circuits

D. Light-Emitting diodes conduct current in either direction in circuits</span>

ANSWER

The correct option is A.

Light emitting diodes [LED] refers to a semi conductor diode that glows when current flows through it by converting electrical energy into light. LED has many applications and one of it is that is used as an indicator in electric circuits. The circuit symbol of LED is made up of two arrow marks, which is used to indicate the radiation that is emitted by the diode.

3 0
4 years ago
Desinated for a network connection within a largecity or multiple small citys
frozen [14]

I think it is WAN (Wide Area Network).

6 0
3 years ago
Clarice is an architect who is involved in design work on a restaurant in a building that used to be part of the city’s water wo
Rufina [12.5K]
Archeology & engineering hope that helps
5 0
3 years ago
With SAN technology, servers use a separate network to communicate with the storage device. Group of answer choices True False
Serga [27]

Answer:

true

Explanation:

4 0
2 years ago
Other questions:
  • ​_______ consists of the analysis​ tools, technologies, and processes by which marketers dig out meaningful patterns in big data
    7·1 answer
  • The analysts at Techno Info Systems are considering the four-model approach to system development for a new client. If they make
    12·1 answer
  • CRM systems provide an organization with an important element: all employees of the company who directly or indirectly serve a c
    9·1 answer
  • Web 2.0 has led to a shift just from consuming content towards what
    6·1 answer
  • Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with e
    11·1 answer
  • Auditors often make use of computer programs that perform routine processing functions, such as sorting and merging. These progr
    12·1 answer
  • To help determine to which application a transmission should be delivered on a particular computer, TCP uses the application lay
    8·2 answers
  • Which statement is NOT true regarding regular expression quantifiers? Group of answer choices They act on the preceding pattern
    11·1 answer
  • 4. What is the formula for calculating the file size?
    11·1 answer
  • Type the correct answer in the box. Spell all words correctly. Which language should you use to add functionality to web pages?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!