不用for打代码,有没有会的

![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/587490939636112.jpg "#left

嵌套循环,还不能用两个for循环?是需要用while吗?

参考如下:

#include <stdio.h>
int main()
{
    int i=1,j=1;
    while(i<=9)
    {
        j=1;
        while(j<=i)
        {
            printf("%2d*%2d=%2d",i,j,i*j);
            j++;
        }
        printf("\n");
        i++;
    }
    return 0;

}