a = float(input("nhap so dau tien:"))
b = float(input("nhap so thu hai:"))
c = str(input("nhap phep tinh: "))
while c !="+" and c !="-" and c !="*" and c !="/" and c !="%" and c !="**" and c !="//":
c = str(input("nhap lai phep tinh: "))
if c == "+":
print("phep cong", a + b)
elif c == "-":
print("phep tru", a-b)
elif c == "*":
print("phep nhan", a*b)
elif c == "/":
print("phep chia",a/b)
elif c == "%":
print("phep chia lay du",a%b)
elif c =="**":
print("phep luy thua",a**b)
elif c == "//":
print("phep chia lay phan nguyen",a//b)
Đăng nhập để tham gia bình luận