| Lexington High School Mathematics | Math Dept. Front Page | Student Links | Family Links |
| Introduction to C++, Kevin Kelly | Kelly Front Page | C++ Course Guide | C++ Assignments | C++ Info |
Write a program that computes and prints out a 12-by-12 multiplication chart. Your program must use a nested loop (a loop inside another loop).
Some specific requirements about what the chart should look like:
For 10 pts.: Also make your program calculate the column width based on n, so that the program always uses the smallest possible column width (i.e., if the column width were 1 less, some numbers in the chart would run into each other). Provide sample runs with input values of 3, 4, 9, 10, 12, 18, and 20.