题目:如何打印出阶梯状的99乘法表?
题解:
#coding:utf-8def multiplication_tables(num):#for i in range(1,10): for j in range(1,i+1): print("%d*%d=%d"%(j,i,i*j),end=" ") print(" ")for i in range(1,10): multiplication_tables(i)
时间: 2024-10-09 10:09:48
题目:如何打印出阶梯状的99乘法表?
题解:
#coding:utf-8def multiplication_tables(num):#for i in range(1,10): for j in range(1,i+1): print("%d*%d=%d"%(j,i,i*j),end=" ") print(" ")for i in range(1,10): multiplication_tables(i)