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
yulyashka [42]
3 years ago
5

Write a program that prints the numbers 1 to 4 on the sameline with each pair of adjacent numbers separated by a single space(1

2 3 4). Print the numbers in the followingthree ways:
(a) Using one output statement with one streaminsertion operator.
(b) Using one output statement with four streaminsertion operators.
(c) Using four output statements.
Computers and Technology
1 answer:
kondaur [170]3 years ago
7 0

Answer:

#include <iostream>

using namespace std;

int main() {

   cout<<"Printing by method 1"<<endl;

   //using 1 output statement with one streaminsertion operator.

   cout<<"1 2 3 4";

   cout<<endl<<"Printing by method 2"<<endl;

   //using 1 output statement with four stream insertion operator.

   cout<<"1 "<<"2 "<<"3 "<<"4";

   cout<<endl<<"Printing by method 3"<<endl;

   //using four output statements.

   cout<<"1 ";

   cout<<"2 ";

   cout<<"3 ";

   cout<<"4 ";

return 0;

}

Output:-

Printing by method 1

1 2 3 4

Printing by method 2

1 2 3 4

Printing by method 3

1 2 3 4

Explanation:

The above code is as per the question given.All the three methods are implemented as per the question.

You might be interested in
What phrase best describes the overall structure of the<br> passage
creativ13 [48]

Answer: The one that gives you more vibe that its correct.

Explanation:

3 0
3 years ago
______ is used to extract knowledge from sources of data-NoSQL databases, Hadoop data stores, and data warehouses-to provide dec
Alex777 [14]

Answer: Data analytics

Explanation:

3 0
2 years ago
A(n) ________ is usually a live broadcast of audio or video content. Select one: A. instant message B. webcast C. podcast D. wik
navik [9.2K]

Answer: B webcast

Explanation:

A webcast is a technology that allows the live broadcast of an audio or video event on the Internet. It is also known as Web lecture, virtual meeting, etc. The major advantage is that it gives room for an event to have a larger reach. Webcast participation can be through PC, smart phones, tablets and other devices with quality Internet access.

7 0
3 years ago
Read 2 more answers
the majority of refrigeration systems in residential comfort cooling systems use what type of system?
DIA [1.3K]

Air conditioning, or cooling, is more complicated than heating. Instead of using energy to create heat, air conditioners use energy to take heat away. The most common air conditioning system uses a compressor cycle (similar to the one used by your refrigerator) to transfer heat from your house to the outdoors.

Picture your house as a refrigerator. There is a compressor on the outside filled with a special fluid called a refrigerant. This fluid can change back and forth between liquid and gas. As it changes, it absorbs or releases heat, so it is used to “carry” heat from one place to another, such as from the inside of the refrigerator to the outside. Simple, right?

Well, no. And the process gets quite a bit more complicated with all the controls and valves involved. But its effect is remarkable. An air conditioner takes heat from a cooler place and dumps it in a warmer place, seemingly working against the laws of physics. What drives the process, of course, is electricity — quite a lot of it, in fact. Hope this helps?


7 0
3 years ago
Does anybody want to be my friend
Gekata [30.6K]

Answer:

Yeah sure, mines aatelophxbia, i'm 14. what games you play?

6 0
3 years ago
Read 2 more answers
Other questions:
  • Define the method object inc_num_kids() for personinfo. inc_num_kids increments the member data num_kids. sample output for the
    11·1 answer
  • The answer for this question?
    14·1 answer
  • A(n) _____ measures the ability to juggle a variety of demands, as in a manager's job where the candidate is presented with simu
    8·1 answer
  • Choose all the answers that apply.
    15·1 answer
  • You must. place a child in a federally approved child restraint device. if the child is
    5·2 answers
  • What are the network topologies? Advantages and disadvantages.
    9·1 answer
  • Given three packets of size 2,500 Bytes (caution this is Bytes not bits) each are ready inside computer 1 to be transmitted onto
    14·1 answer
  • What is a web browser​
    9·1 answer
  • Classify the following as cross-section or time-series data: Gross sales of 200 ice cream parlors in July 2009
    8·1 answer
  • I WILL MARK BRAINIEST FOR THIS!!!!!!
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!