Computer Science, asked by hansarianeil9868, 9 hours ago

Create a program that will let you input two numbers and will display its SUM, DIFFERENCE, PRODUCT and QUOTIENT. P

Answers

Answered by saswatsingh629
2

Answer:

Program in javascript:

function display(num1,num2) {

console.log('Sum is' + num1 + num2')

console.log('Difference is' + num1 - num2)

console.log('Product is' + num1*num2)

console.log('Quotient is' + num1 % num2)

}

Answered by 2getsarang
0

Explanation:

print("Calculator")

op = input("A or S or M or D?").lower()

if op == "a":

print("Enter two numbers: ")

first = float(input("First: "))

second = float(input("Second: "))

sum = first + second

print("Sum: " + str(sum))

elif op == "s":

print("Enter two numbers: ")

first = float(input("First: "))

second = float(input("Second: "))

diff = first - second

print("Difference: " + str(diff))

elif op == "m":

print("Enter two numbers ")

first = float(input("First: "))

second = float(input("Second:"))

mul = first * second

print("Product: " + str(mul))

else:

divid = float(input("divident: "))

divis = float(input("divisor: "))

quo = divid / divis

rem = divid % divis

print("Quotient: " + str(quo))

print("Remainder:" + str(rem))

Similar questions