To input two numbers depending upon user's choice add, subtract, multiply or divide the numbers
Answers
Answered by
4
Answer:
hello,
its a program using python
Explanation:
#program to input two numbers depending upon user's choice add, subtract, multiply or divide the numbers.
a=int(input("enter the first number"))
b=int(input("enter the second number"))
operator=str(input("enter the operator"))
if operator=="+":
ans=a+b
print("sum of ",a,"and",b,"is : ",ans)
elif operator=="-":
ans=a-b
print("difference of ",a,"and",b,"is : ",ans)
elif operator=="*":
ans=a*b
print("product of ",a,"and",b,"is : ",ans)
elif operator=="/":
ans=a/b
print("after dividing ",a,"by",b,"the ans is :",ans)
else:
print("please choose some other operator")
______________________
hope it helps you
please mark brainliest
@ItzSnowySecret07
schydv09:
thank you
Similar questions
English,
2 months ago
Science,
2 months ago
Computer Science,
2 months ago
Math,
5 months ago
Math,
11 months ago
Psychology,
11 months ago