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
Which of the following SNSs has been associated with art work display?
amid [387]
Hoi!

I would say DeviantArt, since that is the world's largest social website dedicated to displaying artwork.
7 0
3 years ago
Read 2 more answers
Which of the following is not a basic networking hardware component? Network interface card
RideAnS [48]

Answer:

Device Driver

Explanation:

All of the other options are physical and are something that you can physically touch. The device driver runs in software and allows the computer to communicate with the device that is attached.

4 0
3 years ago
Olivia works at a company that creates mobile phones. She wanted to estimate the mean amount of time their new phone's battery l
Kisachek [45]

An swer:  

                               

 E. xpl an ation:    

                               

3 0
3 years ago
What is it called when the system and all the components except for the real-time clock are powered down
Colt1911 [192]

Answer:

The correct answer to the following question will be "Mechanical off mode".

Explanation:

  • The device will appear to be either on or off to the user. No other states are measurable. The device does, however, support various power states that suit the power states specified in the ACPI specification. Such states also differ, like hybrid sleep and rapid startup. This subject discusses certain states and how they will be represented.
  • The system is completely off, and no power is used. Only after a full reboot will the machine return to working condition.
  • It is called mechanical off mode when the machine and all parts, except for the actual-time clock, are down powered.

Therefore, Mechanical off mode is the right answer.

8 0
3 years ago
an early type of GUI is created, which includes windows, pop-ups, icons, and menus. What year did this happen? Please help!!! qu
Dahasolnce [82]

Answer:

1979

Sources:

Wired

InventHelp

hope i helped :D

3 0
3 years ago
Other questions:
  • A cpu with an external clock speed of 2 ghz and a 64-bit data bus can (theoretically) transfer how much data per second?
    8·1 answer
  • List of programming languages and their typing
    5·2 answers
  • What are the first and the last physical memory addressesaccessible using
    10·1 answer
  • Why is statistics important?
    6·1 answer
  • The keywords used in programming languages that use decisions to redirect the flow of a program are called ________. A.flowchart
    11·1 answer
  • Identify the terms associated with the given statements below;
    6·1 answer
  • Which of the following statements is true of a server? Question 18 options: A) It supports processing requests from remote compu
    11·1 answer
  • The factorial of n is equal to ______.
    9·1 answer
  • Please answer this question​
    12·1 answer
  • Michelle has defined a custom object by creating an object literal. She wants to access the properties of the custom object. Mic
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!