// july10ex3.cpp : Defines the entry point for the console application.
// This program creates a multiplication table in the form:
//    0   0   0   0   0   0   0   
//   x0  x1  x2  x3  x4  x5  x6
//  --- --- --- --- --- --- ---    .
//    0   0   0   0   0   0   0 .
//  
//                                        9   9
//                                       x8  x9
//                                      --- ---
//                                       72  81
//


#include "stdafx.h"

int main(int argc, char* argv[])
{

	int factor1, factor2;

	for (factor1=0; factor1<=9; factor1++){

	    for (factor2=0; factor2<=9; factor2++) 
			  printf("%4d", factor1);
		printf("\n");

	    for (factor2=0; factor2<=9; factor2++) 
			  printf(" x%2d", factor2);
		printf("\n");

	    for (factor2=0; factor2<=9; factor2++) 
			  printf(" ---");
		printf("\n");

	    for (factor2=0; factor2<=9; factor2++) 
			  printf("%4d", factor1 * factor2);
 
         

		printf("\n\n");
	} /* end for factor1 */

	return 0;
}