//1. Implement a function, print the multiplication formula table, specify the number of rows and columns of the formula table by yourself, //input 9, output 9 * 9 formula table, output 12, output 12 * 12 multiplication formula table.


#include<stdio.h>
int print(int num)
{
int i = 0;
for (i = 1; i <= num; i++)
{
int j = 0;
for (j = 1; j <= i; j++)
{
printf("%d*%d=%d  ",j,i,j*i );
}
printf("\n");
}
}


int main ()
{
int n = 0;
scanf("%d", &n);
print(n);
system("pause");
return 0;
}

Guess you like

Origin blog.csdn.net/lxp_mujinhuakai/article/details/53730228