MarkBoran3369 MarkBoran3369
  • 18-10-2019
  • Computers and Technology
contestada

Write a C++ Win32 Console Application that will use nested for loops to generate a multiplication table from 1 x 1 to 10 x 10. Use the "tab" escape sequence ("\t") to format the table properly.

Respuesta :

tonb
tonb tonb
  • 18-10-2019

Answer:

#include <iostream>

using namespace std;

int main()

{

for (int outer = 1; outer <= 10; outer++)

{

 for (int inner = 1; inner <= 10; inner++)

 {

  cout << inner << "\tx\t" << outer << "\t=\t" << inner*outer << endl;

 }

 cout << endl;

}

}

Explanation:

I think when you replace the tabs by spaces, the layout is more pleasing. Couldn't figure out if you can override the default tab size of 8 characters...

Answer Link

Otras preguntas

How do I explain how to find one quantity as a percentage of another
Which event during the colonial era most influenced the concept of freedom of the press
1. Why do you think the rule is called the difference of two squares? 2. Does it matter whether the product is (a+b) (a-b) or (a-b) (a+b)? Explain .
A B Isabel Allende bailar Rachael Ray cantar James Cameron correr Venus y Serena Williams escribir Joey Votto hablar Nelly F
the Greek roots mono and logue means
Suppose you know that a line passes through the point (0, 1). Its slope is 1. Find another point on the line.
George, Jerry, and Harry are passengers on a flight from Chicago to New York. They injure their legs when their seatbelts do not fasten during take-off The airl
what are 10 ways you could get 28 by using lenght tims width times hight?
What regions of the United States were Native Americans forced to leave? the region?
Explain how a sundial works.