python中为什么打印不出九九乘法表,而是一直连续相乘
i = 1while i <= 9:
j = 1
while j <= i:
print(j,"*",i,"=",j * i,end=" ")
j += 1
print()
i += 1
后面两句多了一个缩进
i = 1
while i <= 9:
j = 1
while j <= i:
print(j,"*",i,"=",j * i,end=" ")
j += 1
print()
i += 1
最后两行缩进有问题
页:
[1]