任意输入两个整数,如果两个整数大于0,做求和运算,否则做相乘运算,将两个整数运算的结果显示输出。
def result(a,b): if a>0 and b>0: print("求和:",a+b) else: print("相乘:",a*b) result(0,3)
a=int(input()) b=int(input()) if a>0 && b>0: print(a+b) else: print(a*b)