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
_____ is two or more connected computers.
aliya0001 [1]
A Network

A Network is a connection of computers. Imagine lots of people joined together. You might call that a network.
5 0
3 years ago
Given that the input A is false, the input B is false, and the input C is true, what is the resulting value of the output?
Debora [2.8K]

Answer:

out put is false

Explanation:

I hope it's helpful

6 0
2 years ago
You are about to repair and change the resistor (small components),but the components are too small to solder and hold,what tool
exis [7]

Answer:

Needle-nose pliers

Explanation:

Required

Tool used to hold small components

The device to do this is the needle nose pliers.

This device has several functions, but it is specifically designed to hold small components in the computer when the computer is being repaired.

Among the other functions are:

  • Picking small and tiny screws
  • Cutting of wires
  • Hold wires against the side of the computer case
8 0
3 years ago
What is the most popular type or method of guaranteed reservation where booking transactions will be charged automatically?
Rzqust [24]

Answer:

Credit cards.

Explanation:

When booking a reservation, the most popular type or method of making sure the reservation is guaranteed where booking transactions are charged automatics is the use of credit cards.

Why this is popular is because, the hotel, reserve or suite that is about to be booked will still receive their money even if the person that booked didn't show up.

4 0
3 years ago
Will give Brainliest 100 points answer only if you know
katrin [286]
There are five basic programming elements, or operations: input, output, arithmetic, conditional, and looping. Every program uses at least two of these.

The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning).

Input: getting data and commands into the computer

Output:getting your results out of the computer

Arithmetic: performing mathematical calculations on your data

Conditional: testing to see if the condition is true or false

Looping: cycling through a set of instructions until some condition is met
7 0
3 years ago
Read 2 more answers
Other questions:
  • Ron frequently uses the word improving in his blog. He types the word imp and the word improving appears. Which feature of his s
    6·2 answers
  • If you touch a downed power line covered or bare, what’s the likely outcome?
    10·2 answers
  • Which protocol is the data transmission standard for the Internet, responsible for sending information from one computer to anot
    14·1 answer
  • If the Update Automatically option is chosen in the Date and Time dialog box, _____. the date will automatically change each tim
    7·1 answer
  • Increasing your margins will increase the amount of space you have to type text on your document. Please select the best answer
    10·1 answer
  • According to the Doppler effect, objects moving away from Earth would have a
    12·2 answers
  • All of the following are strategies to help you prepare for standardized test except <br>​
    5·1 answer
  • Does anyone know answers for reading plus level h and j
    13·2 answers
  • 1.The ___________ method adds a new element onto the end of the array.
    5·1 answer
  • 1 point
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!