第一次写博客多多见谅!
都说乘法表许多面试的都会有这么个题目就自己写了写,既然学的是python,就用Python写出来,不足支出多多指点啊!
-----------------------(1)
i = 1
while i<=9:
q = 1
while q<=i:
print("%d*%d=%d"%(q,i,q*i),end = "\t")
q+=1
print()
i+=1
---------------------(2)
for i in range(1,10):
for q in range(1,i+1):
print("%d*%d=%d"%(q,i,q*i),end = "\t")
print()