(Tabular Output) Write a C++ program that uses a while statement and the tab escape se- quence \t to print the following table of values:



What will be an ideal response?


```
// Print table of values with counter-controlled repetition.
#include
using namespace std;

int main()
{
int n = 0;

// display table headers with tabbing
cout << "N\t10*N\t100*N\t1000*N\n\n";

while ( ++n <= 5 ) // loop 5 times
{
// calculate and display table values
cout << n << '\t' << 10 * n << '\t' << 100 * n
<< '\t' << 1000 * n << '\n';
} // end while

cout << endl;
} // end main
```

Computer Science & Information Technology

You might also like to view...

What are the aims of static typing and dynamic evaluation?

What will be an ideal response?

Computer Science & Information Technology

Formats applied to text that include shadows, reflections, glows, bevels, and 3-D rotations.

What will be an ideal response?

Computer Science & Information Technology

The first popular markup language introduced in the 1980s was _______.

A. HTML B. SGML C. XHTML D. XML

Computer Science & Information Technology

Which type of fiber is preferred for use in modern computer networks?

a. Multimode b. Polarized mode c. Single-mode d. All of these answers are correct.

Computer Science & Information Technology