|
本帖最后由 snail_gzm 于 2013-7-14 00:30 编辑
不用这么复杂吧,a为y轴,就是多少行,b为X轴多少列,a负责打个回车,b负责列式子就可以了吧
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b;
for(a=1;a<=9;a++)
{
for(b=1;b<=9;b++)
{
printf("%2dx%2d=%2d ",a,b,a*b);
}
printf("\n");
}
system("pause");
return 0; |
|