#include <stdio.h>
int main()
{
for (int i = 1; i <=9; i++)
{
for (int j = 1; j <= i; j++)
{
printf("%d*%d=%d ", j, i, j*i);
}
printf("\n");
}
getchar();
return 0;
}
运行截图:
#include <stdio.h>
int main()
{
for (int i = 1; i <=9; i++)
{
for (int j = 1; j <= i; j++)
{
printf("%d*%d=%d ", j, i, j*i);
}
printf("\n");
}
getchar();
return 0;
}
运行截图: