Write a program that prints the numbers 1 to 4 on the same line with each pair of adjacent numbers separated by one space. Do this several ways:
a) Using one statement with one stream insertion operator.
b) Using one statement with four stream insertion operators.
c) Using four statements.
```
// Exercise 2.17 Solution: ex02_17.cpp
#include
using namespace std; // program uses names from the std namespace
int main()
{
// Part a
cout << "1 2 3 4\n";
// Part b
cout << "1 " << "2 " << "3 " << "4\n";
// Part c
cout << "1 ";
cout << "2 ";
cout << "3 ";
cout << "4" << endl;
} // end main
```
You might also like to view...
When you add additional forms to a project, you add additional ____________, which are stored in their own source code files.
a. classes b. objects c. methods d. events
The Transformation Function that moves the object offY pixels down is ____.
A. translateY(offY) B. scaleY(offY) C. skewY(offY) D. translate(offX, offY)