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
TRUE OR FALSE!!<br> Your location can be identified simply by turning on your cell phone..
Tasya [4]

Answer:

this is true

Explanation:

this is true because of the GPS location device built into your phone

3 0
3 years ago
Read 2 more answers
Riser cards on some proprietary systems plug into a unique socket or slot on the motherboard. These are also called________
inysia [295]

Answer: Daughter board

Explanation:

A daughter board is refers to the circuit board and it is basically connected to the motherboard directly without any interruption.

It is also known as a daughter card which plugs and then extended the circuitry by connecting with the another circuit board. A mezzanine card and the riser card are the examples of the daughter board that used in the system.

According to the question, the riser card basically plus into the unique socket or the slot in the board and this is known as the daughter board.

Therefore, Daughter board is the correct answer.          

8 0
3 years ago
Zohan uses the following analogy to describe a concept of object-oriented programming. A button can have many uses. When it is p
Vika [28.1K]

Answer:

Polymorphism

Explanation:

You can have a basic button class that gets inherited by other classes.

class Button {

function pushButton(){}

}

class ElevatorButton extends Button{};

class BigRedButton extends Button{};

With these new classes, they inherit from the basic button class. They can decide what happens when the method pushButton() is called.

You don't need to worry about what pushButton() actually does, you can just call it if the object is of the type "Button" and you can expect it to work.

4 0
2 years ago
It is safe to tell an online acquaintance (someone you have never met in person) your
Anna [14]
It is safe to give out information that the other user can't use to track you. Generally, these include favorite music, favorite bans, hobbies.

It is never safe to give our personal and identifying information about yourself. This includes your full name (in most cases), place of residence, or any other contact information you may have - such as social media information.

D. Favorite music
7 0
3 years ago
Read 2 more answers
.Why are protocols important for networking?
NNADVOKAT [17]

Answer: Networking protocols are important as they define a set of rules to be used for exchanging information between computer nodes.

Explanation:

in terms of networking it is required for the source and the destination to have a set of predefined rules which enables the router to send and receive information across the network in such as way that both the ends are able to receive the messages.

The information exchange takes place first by the client by introducing itself to the remote server. the remote server upon receiving the information uses some form of handshaking and acknowledges the client of the receipt of the message.

besides this there are many routing protocols which tells us about the way how packets are sent from the client to the source. There are two types of routing protocols:

1. static routing protocols

2. dynamic routing protocols.

6 0
3 years ago
Other questions:
  • Anyone want to talk?
    13·2 answers
  • The first step in database design is defining a _____, which defines how data is created, represented, organized, and maintained
    13·1 answer
  • Where does Microsoft word put elements such as text logos or graphics saved for later use in a document
    15·1 answer
  • Match the items with their respective descriptions. denotes row numbers denotes cell addresses denotes worksheets denotes column
    10·1 answer
  • Which component of a computing device drains the battery the fastest?(1 point)
    8·2 answers
  • Network layer functionalities can be broadly divided into data plane functionalities and control plane functionalities. What are
    8·2 answers
  • The total magnification of a specimen viewed under a compound light microscope is determined by:
    6·2 answers
  • A deluxe meal, represented by a DeluxeMeal object, includes a side dish and a drink for an additional cost of $3. The DeluxeMeal
    14·1 answer
  • 1.printer is an example of......... device.<br><br>​
    11·2 answers
  • While operating a vehicle on any highway of this state, it it illegal to physically hold or support a wireless device with any p
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!