bdMack6475 bdMack6475
  • 27-08-2017
  • Computers and Technology
contestada

Write a program that reads in two integers typed on the keyboard and outputs their sum, difference, and product.

Respuesta :

prevost400 prevost400
  • 09-09-2017
# Written in python

a = int(input("Enter an integer: "))
b = int(input("Enter an integer: "))

sum = a + b

# subtract the smaller number from the bigger
if a < b:
    dif = a - b
else:
    dif = b - a

prod = a * b

print("The sum is", sum)
print("The dif is", dif)
print("The product is", prod)
Answer Link

Otras preguntas

Solve. 2/3x+5/6=3 1/3 Enter your answer as a mixed number in simplest form in the box.
For the circuit shown in figure below R1 = 10Kohm , R2=1Mohm R3=10kohm R4=10kohm R5=150Kohm
please help meeeeeeee
An object exerts a reaction force when it ____. A. is pulled by another object B. maintains its direction of motion C. has a net force of zero D. is pushed by a
Movement caused by warmer fluids rising and cooler fluids sinking is called ______________.
Yellow seeds are dominant over green seeds in pea plants. One parent plant is green (yy) and the other parent plant is yellow (YY). What percent of offspring wi
6 5/9 + 2 3/6 help lol
Give reasons why we cannot hear the sound from the space?
Write a one-paragraph (5-7 sentences) reflection on the dangers of drugs and how they can interfere with you achieving your goals.
Help me please l beg l need the answers