Question
How do you do the multiplication table from 0 - 10 with nested loops ?
Answers
for i=1..10 {print i} /* print the column headers */
for i=1..10 {
print i /* number the rows 1-10 */
for j=1..10 {print i*j}
print "\n" /* go to next row */
}
use a print statement that does not implicitly include a newline
use a formatted print so the digits line up correctly
for i=1..10 {
print i /* number the rows 1-10 */
for j=1..10 {print i*j}
print "\n" /* go to next row */
}
use a print statement that does not implicitly include a newline
use a formatted print so the digits line up correctly
Related Questions
Project: I need help getting start on this project. What I have so far is a mess. It's Do While lo...
Write a program to display a multiplication table that shows products of all numbers from 0 to 10. U...
write a multiplication table in python from 1-10 using loops
write a multiplication table in python from 1-10 using loops
example output:
x 1 2 3 4 5 6 7 8 9...