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

Calculate the average speed (in km/h) of a car stuck in traffic that drives 12 kilometers in 2 hours
Why did the Spanish and Portuguese launch voyages of exploration?
Describe the direct effects that volcanoes can have on the surrounding area.
an equilateral triangle and a regular pentagon have the same perimeter. Each side of the pentagon is 3 inches shorter than each side of the triangle. what is th
What do pairs of homologous chromosomes have in common?
If t is any real number, prove that 1+(tant)^2=(sect)^2
(2y-1)(4y-3) What is the answer to this?
In your every day life you come across a range of motion in which ,a) Acceleration is in the direction of motion b) Acceleration is against the direction of mot
How many grams of NH3 can be produced from the reaction of 28g of N2 and 25g of H2?
1. What conditions must exist in order for a force to do work on an object?